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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-10-31 16:33:38 -04:00
parent 03417ccd6d
commit d1b64e31aa

View File

@ -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);