From d1b64e31aa615f9a4e06431fd78f4dfb7db7fb32 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 31 Oct 2016 16:33:38 -0400 Subject: [PATCH] pimd: Be more careful looking up mroute statistics When we get a request to look up the mroute statistics from the kernel, ensure that the interface returned is a valid usable interface. Signed-off-by: Donald Sharp --- pimd/pim_zlookup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index cdaf04566d..53fd0ce071 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -456,6 +456,9 @@ pim_zlookup_sg_statistics (struct channel_oil *c_oil) zlog_debug ("Sending Request for New Channel Oil Information(%s)", pim_str_sg_dump (&more)); } + if (!ifp) + return -1; + stream_reset (s); zclient_create_header (s, ZEBRA_IPMR_ROUTE_STATS, VRF_DEFAULT); stream_put_in_addr (s, &c_oil->oil.mfcc_origin); -- 2.39.5