diff options
author | delphij <delphij@FreeBSD.org> | 2015-08-05 22:04:56 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2015-08-05 22:04:56 +0000 |
commit | 247f258761b884908a602fa331898ec778345877 (patch) | |
tree | 77859919151185174ed9c922929efdc6987e638e /sbin | |
parent | 90e38dfd93e2eab866d5b6238f87a0ea4965b59a (diff) | |
download | FreeBSD-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.c | 6 |
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", |