summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-08-05 22:04:56 +0000
committerdelphij <delphij@FreeBSD.org>2015-08-05 22:04:56 +0000
commit247f258761b884908a602fa331898ec778345877 (patch)
tree77859919151185174ed9c922929efdc6987e638e /sbin
parent90e38dfd93e2eab866d5b6238f87a0ea4965b59a (diff)
downloadFreeBSD-src-247f258761b884908a602fa331898ec778345877.zip
FreeBSD-src-247f258761b884908a602fa331898ec778345877.tar.gz
Fix a bug which could make routed(8) daemon exit by sending a special RIP
query from a remote machine, similar to SA-14:21.routed. Submitted by: hrs
Diffstat (limited to 'sbin')
-rw-r--r--sbin/routed/input.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sbin/routed/input.c b/sbin/routed/input.c
index 895ef50..bc03028 100644
--- a/sbin/routed/input.c
+++ b/sbin/routed/input.c
@@ -160,6 +160,12 @@ input(struct sockaddr_in *from, /* received from this IP address */
trace_rip("Recv", "from", from, sifp, rip, cc);
+ if (sifp == 0) {
+ trace_pkt(" discard a request from an indirect router"
+ " (possibly an attack)");
+ return;
+ }
+
if (rip->rip_vers == 0) {
msglim(&bad_router, FROM_NADDR,
"RIP version 0, cmd %d, packet received from %s",
OpenPOWER on IntegriCloud