summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-02-11 17:29:36 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-02-11 17:31:25 +0100
commitb3556ea327bf3abc4bd183a4b5b8ad1a15d15035 (patch)
tree5d8b5372d5cdb9c2409edcae60695f23d0aa668d
parentquagga: remove "cn321" passwords from the default conf file for each (diff)
downloadfrr-b3556ea327bf3abc4bd183a4b5b8ad1a15d15035.tar.xz
frr-b3556ea327bf3abc4bd183a4b5b8ad1a15d15035.zip
ripd: Fix crash when a default route is passed to rip
When rip is not configured and zebra decides to send a default route to it, check to make sure that rip is configured before accepting anything from zebra. Ticket: CM-9270 Reviewed-by: Don Slice Tested: OSPF test case that was erroring out no longer happens Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--ripd/rip_zebra.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c
index 4fc0e00aa..cbff810b0 100644
--- a/ripd/rip_zebra.c
+++ b/ripd/rip_zebra.c
@@ -106,7 +106,10 @@ rip_zebra_read_ipv4 (int command, struct zclient *zclient, zebra_size_t length,
unsigned long ifindex;
struct in_addr nexthop;
struct prefix_ipv4 p;
-
+
+ if (!rip)
+ return 0;
+
s = zclient->ibuf;
ifindex = 0;
nexthop.s_addr = 0;