]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: When not fully connected to zebra gracefully ignore the issue 1366/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 26 Oct 2017 02:38:50 +0000 (22:38 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 26 Oct 2017 02:38:50 +0000 (22:38 -0400)
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 <sharpd@cumulusnetworks.com>
bgpd/bgp_zebra.c

index 0d1d768294ff572f152a52628b4453cccb2f5738..bec70502263c8df1b94f1ce7be3fa336f449aaac 100644 (file)
@@ -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",