diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-04-27 21:30:29 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-04-27 21:32:54 +0200 |
commit | 54394daa2d5a2674dbbd4e6d8c424fc55305117c (patch) | |
tree | 3444b7f967154e5531878a1b2b169d49905fd5c7 /bgpd/bgp_open.c | |
parent | bgpd: Rename graceful restart constants for R/F flags (diff) | |
download | frr-54394daa2d5a2674dbbd4e6d8c424fc55305117c.tar.xz frr-54394daa2d5a2674dbbd4e6d8c424fc55305117c.zip |
bgpd: Rename graceful restart constants for R-bit capabilities
Just to better understand what they mean.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_open.c')
-rw-r--r-- | bgpd/bgp_open.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index d2c1ff12b..dc9f97f36 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -518,9 +518,9 @@ static int bgp_capability_restart(struct peer *peer, SET_FLAG(peer->cap, PEER_CAP_RESTART_RCV); restart_flag_time = stream_getw(s); if (CHECK_FLAG(restart_flag_time, GRACEFUL_RESTART_R_BIT)) - SET_FLAG(peer->cap, PEER_CAP_RESTART_BIT_RCV); + SET_FLAG(peer->cap, PEER_CAP_GRACEFUL_RESTART_R_BIT_RCV); else - UNSET_FLAG(peer->cap, PEER_CAP_RESTART_BIT_RCV); + UNSET_FLAG(peer->cap, PEER_CAP_GRACEFUL_RESTART_R_BIT_RCV); UNSET_FLAG(restart_flag_time, 0xF000); peer->v_gr_restart = restart_flag_time; @@ -528,7 +528,8 @@ static int bgp_capability_restart(struct peer *peer, if (bgp_debug_neighbor_events(peer)) { zlog_debug("%s Peer has%srestarted. Restart Time : %d", peer->host, - CHECK_FLAG(peer->cap, PEER_CAP_RESTART_BIT_RCV) + CHECK_FLAG(peer->cap, + PEER_CAP_GRACEFUL_RESTART_R_BIT_RCV) ? " " : " not ", peer->v_gr_restart); @@ -1417,7 +1418,7 @@ static void bgp_peer_send_gr_capability(struct stream *s, struct peer *peer, restart_time = peer->bgp->restart_time; if (peer->bgp->t_startup) { SET_FLAG(restart_time, GRACEFUL_RESTART_R_BIT); - SET_FLAG(peer->cap, PEER_CAP_RESTART_BIT_ADV); + SET_FLAG(peer->cap, PEER_CAP_GRACEFUL_RESTART_R_BIT_ADV); if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) zlog_debug("[BGP_GR] Sending R-Bit for Peer :%s :", |