From 4c2620da59b1c21427ecbd9bd108a4b416d7d7b7 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 18 Mar 2016 13:18:33 +0000 Subject: [PATCH] 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 --- bgpd/bgp_zebra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.39.5