From: root Date: Fri, 18 Mar 2016 13:18:33 +0000 (+0000) Subject: bgpd: Fix initialization check for bgp tests X-Git-Tag: frr-2.0-rc1~1052 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4c2620da59b1c21427ecbd9bd108a4b416d7d7b7;p=mirror%2Ffrr.git bgpd: Fix initialization check for bgp tests 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 --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 0e83152397..a00cc9f67e 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -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))