Thanks, good to know you have the same fix for this issue.

Cheers,
Jonathan

On Thu, Apr 21, 2016 at 1:50 PM, Jafar Al-Gharaibeh <ja...@atcorp.com>
wrote:

> Jon,
>
>  We actually ran into this a couple of days and fixed it on our end.
>  I was waiting for more testing before I submit the same patch.
> So, I confirm that this is a big issue, it almost renders pimd useless
>  because it is going to hang on the first nexthop lookup.
>
> Thank you,
> Jafar
>
> Acked-by: Jafar Al-Gharaibeh
>
>
> On 4/20/2016 12:13 AM, jonomh...@gmail.com wrote:
>
>> From: Jonathan Hart <j...@onlab.us>
>>
>> I was running in to a bug when pimd would hang in some cases when
>> it had to do a nexthop lookup from zebra, such as when a PIM JOIN
>> was received. This issue could be easily reproduced by running
>> 'show ip rib <ip>' from the pimd vty which forces a nexthop lookup.
>>
>> The issue is in zclient_read_nexthop, the zclient_read_header function
>> reads the message content into the stream, but then after that the
>> zclient_read_nexthop function tries to read the message content again
>> from the socket, but there are no bytes so it hangs waiting for input.
>> The solution is to not try to read the message content the second time.
>> ---
>>   pimd/pim_zlookup.c | 9 ---------
>>   1 file changed, 9 deletions(-)
>>
>> diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
>> index b5b219e..770fbf7 100644
>> --- a/pimd/pim_zlookup.c
>> +++ b/pimd/pim_zlookup.c
>> @@ -155,7 +155,6 @@ static int zclient_read_nexthop(struct zclient
>> *zlookup,
>>     u_char version;
>>     uint16_t vrf_id;
>>     uint16_t command;
>> -  int nbytes;
>>     struct in_addr raddr;
>>     uint8_t distance;
>>     uint32_t metric;
>> @@ -189,14 +188,6 @@ static int zclient_read_nexthop(struct zclient
>> *zlookup,
>>       return -2;
>>     }
>>     -  nbytes = stream_read(s, zlookup->sock, length);
>> -  if (nbytes < length) {
>> -    zlog_err("%s %s: failure reading zclient lookup socket: nbytes=%d <
>> len=%d",
>> -            __FILE__, __PRETTY_FUNCTION__, nbytes, length);
>> -    zclient_lookup_failed(zlookup);
>> -    return -3;
>> -  }
>> -
>>     if (command != ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB) {
>>       zlog_err("%s: socket %d command mismatch: %d",
>>               __func__, zlookup->sock, command);
>>
>
>
_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to