From: Donald Sharp Date: Mon, 31 Oct 2016 20:33:38 +0000 (-0400) Subject: pimd: Be more careful looking up mroute statistics X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~147 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d1b64e31aa615f9a4e06431fd78f4dfb7db7fb32;p=mirror%2Ffrr.git 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 --- 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);