* While the Deferral timer is running, signal route update pending
(ZEBRA_CLIENT_ROUTE_UPDATE_PENDING) from BGPD to Zebra.
* After expiry of the Deferral timer, the deferred routes are processed.
When the deferred route_list becomes empty, End-of-Rib is send to the
peer and route processing complete message (ZEBRA_CLIENT_ROUTE_UPDATE_COMPLETE)
is sent to Zebra. So that Zebra would delete any stale routes still
present in the rib.
Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
#include "filter.h"
#include "command.h"
#include "lib_errors.h"
#include "filter.h"
#include "command.h"
#include "lib_errors.h"
#include "lib/json.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_attr.h"
#include "lib/json.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_attr.h"
peer->peer_gr_new_status_flag = from_peer->peer_gr_new_status_flag;
bgp_peer_gr_flags_update(peer);
peer->peer_gr_new_status_flag = from_peer->peer_gr_new_status_flag;
bgp_peer_gr_flags_update(peer);
+ BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(
+ peer->bgp,
+ peer->bgp->peer);
+
if (bgp_peer_gr_mode_get(peer) == PEER_DISABLE) {
UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_MODE);
if (bgp_peer_gr_mode_get(peer) == PEER_DISABLE) {
UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_MODE);
if (bgp_stop(peer) < 0)
return -1;
if (bgp_stop(peer) < 0)
return -1;
+ /* Send graceful restart capabilty */
+ BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(
+ peer->bgp, peer->bgp->peer);
+
bgp_start(peer);
return 0;
}
bgp_start(peer);
return 0;
}
+ /* Send message to RIB indicating route update pending */
+ if (gr_info->af_enabled[afi][safi] == false) {
+ gr_info->af_enabled[afi][safi] = true;
+ /* Send message to RIB */
+ bgp_zebra_update(afi, safi, bgp->vrf_id,
+ ZEBRA_CLIENT_ROUTE_UPDATE_PENDING);
+ }
if (BGP_DEBUG(update, UPDATE_OUT))
zlog_debug("Started the deferral timer for %s eor_required %d",
get_afi_safi_str(afi, safi, false),
if (BGP_DEBUG(update, UPDATE_OUT))
zlog_debug("Started the deferral timer for %s eor_required %d",
get_afi_safi_str(afi, safi, false),
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
zlog_debug(
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
zlog_debug(
- "BGP_GR:: %s ---> Peer: (%s) :",
+ "BGP_GR:: %s Peer: (%s) :",
__func__, peer->host);
peer_old_state = bgp_peer_gr_mode_get(peer);
__func__, peer->host);
peer_old_state = bgp_peer_gr_mode_get(peer);
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
zlog_debug(
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
zlog_debug(
- "BGP_GR::%s:START ---> global_GR_Cmd :%d:",
+ "BGP_GR::%s:START: global_GR_Cmd :%d:",
__func__, global_GR_Cmd);
global_old_state = bgp_global_gr_mode_get(bgp);
__func__, global_GR_Cmd);
global_old_state = bgp_global_gr_mode_get(bgp);
BGP_PEER_GR_DISABLE(peer);
} else {
zlog_debug(
BGP_PEER_GR_DISABLE(peer);
} else {
zlog_debug(
- "BGP_GR:: Default switch inherit mode ::: SOMETHING IS WORONG !!!");
+ "BGP_GR:: Default switch inherit mode ::: SOMETHING IS WRONG !!!");
- zlog_debug("BGP_GR:: Default switch mode ::: SOMETHING IS WORONG !!!");
+ zlog_debug("BGP_GR:: Default switch mode ::: SOMETHING IS WRONG !!!");
break;
}
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
break;
}
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
#include "memory.h"
#include "lib/json.h"
#include "lib_errors.h"
#include "memory.h"
#include "lib/json.h"
#include "lib_errors.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"
#include "bgpd/bgp_route.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"
#include "bgpd/bgp_route.h"
/* Send EOR message when all routes are processed */
if (list_isempty(bgp->gr_info[afi][safi].route_list)) {
bgp_send_delayed_eor(bgp);
/* Send EOR message when all routes are processed */
if (list_isempty(bgp->gr_info[afi][safi].route_list)) {
bgp_send_delayed_eor(bgp);
+ /* Send route processing complete message to RIB */
+ bgp_zebra_update(afi, safi, bgp->vrf_id,
+ ZEBRA_CLIENT_ROUTE_UPDATE_COMPLETE);