From: Donald Sharp Date: Thu, 26 Oct 2017 02:38:50 +0000 (-0400) Subject: bgpd: When not fully connected to zebra gracefully ignore the issue X-Git-Tag: frr-4.0-dev~180^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ea12cf1125ef21b334c1f1703ed6224242c15bf8;p=matthieu%2Ffrr.git bgpd: When not fully connected to zebra gracefully ignore the issue When bgp is coming up and is reading a non-integrated config. The bgp connection to zebra has not fully had a chance to start. As such when a redistribute line is parsed the attempt is made to install it but it was erroring out with a warning. This caused the `redistribute XXX` line to create a error message to the end user. Since bgp calls zclient_send_reg_requests which re-registers the redistribute call once the actual zebra connection is up and once bgp comes alive this is ok. Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 0d1d768294..bec7050226 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1338,12 +1338,14 @@ int bgp_redistribute_set(struct bgp *bgp, afi_t afi, int type, u_short instance) vrf_bitmap_set(zclient->redist[afi][type], bgp->vrf_id); } - /* Don't try to register if we're not connected to Zebra or Zebra - * doesn't - * know of this instance. + /* + * Don't try to register if we're not connected to Zebra or Zebra + * doesn't know of this instance. + * + * When we come up later well resend if needed. */ if (!bgp_install_info_to_zebra(bgp)) - return CMD_WARNING_CONFIG_FAILED; + return CMD_SUCCESS; if (BGP_DEBUG(zebra, ZEBRA)) zlog_debug("Tx redistribute add VRF %u afi %d %s %d",