]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Prevent Lockup when waiting for response from zebra
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 15 Jun 2017 00:02:38 +0000 (20:02 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Jul 2017 17:51:40 +0000 (13:51 -0400)
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 <sharpd@cumulusnetworks.com>
pimd/pim_zlookup.c

index 3fe2f4d92ace5b27d208f587b648ce63924d695c..a60baba73df848b279fcbafa97d23645362680f8 100644 (file)
@@ -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);