pimd: Fix hang when doing nexthop lookup from zebra
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.
Acked-by: Jafar Al-Gharaibeh
Tested-by: NetDEF CI System <cisystem@netdef.org>
1 file changed