From b07d93f53871940d82923340575bf5310dc4e561 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Wed, 5 Aug 2015 22:04:56 +0000 Subject: [PATCH] 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 --- sbin/routed/input.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sbin/routed/input.c b/sbin/routed/input.c index 895ef507db7e..bc030283e15f 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",