From: Donald Sharp Date: Thu, 6 Jul 2017 17:44:18 +0000 (-0400) Subject: pimd: Fix pim not recognizing itself as an RP in some cases X-Git-Tag: frr-4.0-dev~468^2~26 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d3a551b9521705ae296e594dc88a74123c04e542;p=mirror%2Ffrr.git pimd: Fix pim not recognizing itself as an RP in some cases During normal course of operations, zebra sends the ZEBRA_INTERFACE_VRF_UPDATE call up into all connected zclients. In the case of PIM the zlookup was expecting a min length of 10, but ZEBRA_INTERFACE_VRF_UPDATE was sending of size 6. This min length check makes no sense, so just remove. Ticket: CM-16976 Signed-off-by: Donald Sharp Reviewed-by: Daniel Walton --- diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 9d85941596..896b1f2195 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -142,7 +142,6 @@ static int zclient_read_nexthop(struct pim_instance *pim, { int num_ifindex = 0; struct stream *s; - const uint16_t MIN_LEN = 10; /* getipv4=4 getc=1 getl=4 getc=1 */ uint16_t length; u_char marker; u_char version; @@ -173,14 +172,6 @@ static int zclient_read_nexthop(struct pim_instance *pim, zclient_lookup_failed(zlookup); return -1; } - - if (length < MIN_LEN) { - zlog_err( - "%s: failure reading zclient lookup socket: len=%d < MIN_LEN=%d", - __PRETTY_FUNCTION__, length, MIN_LEN); - zclient_lookup_failed(zlookup); - return -2; - } } raddr.s_addr = stream_get_ipv4(s);