]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix initialization check for bgp tests
authorroot <root@CL-build01.cumulusnetworks.com>
Fri, 18 Mar 2016 13:18:33 +0000 (13:18 +0000)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 18 Mar 2016 13:36:05 +0000 (09:36 -0400)
With the vrf startup code put in place we've modified
bgp startup.  If we are running inside of the 'make check'
infrastructure zclient is going to be NULL since it is
not initialized yet nor do we really want to connect
to zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_zebra.c

index 0e831523971aa28da5f6bc9517f8dddcadcda706..a00cc9f67eb78523b2c63770eb82abcd0a141b10 100644 (file)
@@ -1992,7 +1992,7 @@ void
 bgp_zebra_instance_register (struct bgp *bgp)
 {
   /* Don't try to register if we're not connected to Zebra */
-  if (zclient->sock < 0)
+  if (!zclient || zclient->sock < 0)
     return;
 
   if (BGP_DEBUG (zebra, ZEBRA))