From 3af2452c048042f337a52ddb588df01569e4cf52 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 14 Jun 2017 20:02:38 -0400 Subject: [PATCH] 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 --- pimd/pim_zlookup.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.39.5