From: Donald Sharp Date: Thu, 15 Jun 2017 00:02:38 +0000 (-0400) Subject: pimd: Prevent Lockup when waiting for response from zebra X-Git-Tag: frr-4.0-dev~468^2~46 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3af2452c048042f337a52ddb588df01569e4cf52;p=matthieu%2Ffrr.git pimd: Prevent Lockup when waiting for response from zebra When we have vrf config that we have not fully setup yet, (ie zebra knows nothing about it yet), when attempting to do a nexthop_lookup, zebra will just drop the request if it doesn't know about the vrf. In this case, we need to safely not ask for the information Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 3fe2f4d92a..a60baba73d 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -316,6 +316,13 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim, return -1; } + if (pim->vrf->vrf_id == VRF_UNKNOWN) { + zlog_err( + "%s: VRF: %s does not fully exist yet, delaying lookup", + __PRETTY_FUNCTION__, pim->vrf->name); + return -1; + } + s = zlookup->obuf; stream_reset(s); zclient_create_header(s, ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB, pim->vrf_id);