mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-30 04:31:02 +00:00
bgpd: Adding helper caller hooks for BGPD-ZEBRA integration for GR.
*Adding helper caller hooks function for signalling from BGPD to ZEBRA to enable or disable GR feature in ZEBRA depending on bgp per peer gr configuration. Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
This commit is contained in:
parent
85ef4179ad
commit
0f0444fbd8
@ -489,6 +489,10 @@ static int bgp_accept(struct thread *thread)
|
|||||||
peer_xfer_config(peer, peer1);
|
peer_xfer_config(peer, peer1);
|
||||||
bgp_peer_gr_flags_update(peer);
|
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) {
|
if (bgp_peer_gr_mode_get(peer) == PEER_DISABLE) {
|
||||||
|
|
||||||
UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_MODE);
|
UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_MODE);
|
||||||
|
@ -1342,7 +1342,13 @@ static void bgp_peer_send_gr_capability(struct stream *s, struct peer *peer,
|
|||||||
if (peer->bgp->t_startup) {
|
if (peer->bgp->t_startup) {
|
||||||
SET_FLAG(restart_time, RESTART_R_BIT);
|
SET_FLAG(restart_time, RESTART_R_BIT);
|
||||||
SET_FLAG(peer->cap, PEER_CAP_RESTART_BIT_ADV);
|
SET_FLAG(peer->cap, PEER_CAP_RESTART_BIT_ADV);
|
||||||
|
|
||||||
|
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
|
||||||
|
zlog_debug(
|
||||||
|
"BGP_GR:: Sending R-Bit for Peer :%s :",
|
||||||
|
peer->host);
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_putw(s, restart_time);
|
stream_putw(s, restart_time);
|
||||||
|
|
||||||
/* Send address-family specific graceful-restart capability
|
/* Send address-family specific graceful-restart capability
|
||||||
|
@ -773,6 +773,9 @@ void bgp_notify_send_with_data(struct peer *peer, uint8_t code,
|
|||||||
stream_fifo_push(peer->obuf, s);
|
stream_fifo_push(peer->obuf, s);
|
||||||
|
|
||||||
bgp_peer_gr_flags_update(peer);
|
bgp_peer_gr_flags_update(peer);
|
||||||
|
BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(
|
||||||
|
peer->bgp,
|
||||||
|
peer->bgp->peer);
|
||||||
|
|
||||||
bgp_write_notify(peer);
|
bgp_write_notify(peer);
|
||||||
}
|
}
|
||||||
@ -1813,6 +1816,9 @@ static int bgp_notify_receive(struct peer *peer, bgp_size_t size)
|
|||||||
UNSET_FLAG(peer->sflags, PEER_STATUS_CAPABILITY_OPEN);
|
UNSET_FLAG(peer->sflags, PEER_STATUS_CAPABILITY_OPEN);
|
||||||
|
|
||||||
bgp_peer_gr_flags_update(peer);
|
bgp_peer_gr_flags_update(peer);
|
||||||
|
BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(
|
||||||
|
peer->bgp,
|
||||||
|
peer->bgp->peer);
|
||||||
|
|
||||||
return Receive_NOTIFICATION_message;
|
return Receive_NOTIFICATION_message;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user