mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 13:06:51 +00:00
Merge pull request #15951 from FRRouting/mergify/bp/stable/10.0/pr-15883
bgpd: Apply NOOP when doing negative commands for GR operations (backport #15883)
This commit is contained in:
commit
7472bc5bca
@ -2895,19 +2895,22 @@ int bgp_neighbor_graceful_restart(struct peer *peer,
|
||||
|
||||
peer_old_state = bgp_peer_gr_mode_get(peer);
|
||||
|
||||
if (peer_old_state == PEER_INVALID) {
|
||||
zlog_debug("[BGP_GR] peer_old_state == Invalid state !");
|
||||
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
|
||||
zlog_debug("%s [BGP_GR] peer_old_state: %d", __func__,
|
||||
peer_old_state);
|
||||
|
||||
if (peer_old_state == PEER_INVALID)
|
||||
return BGP_ERR_GR_OPERATION_FAILED;
|
||||
}
|
||||
|
||||
peer_state = peer->PEER_GR_FSM[peer_old_state][peer_gr_cmd];
|
||||
peer_new_state = peer_state.next_state;
|
||||
|
||||
if (peer_new_state == PEER_INVALID) {
|
||||
zlog_debug(
|
||||
"[BGP_GR] Invalid bgp graceful restart command used !");
|
||||
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
|
||||
zlog_debug("%s [BGP_GR] peer_new_state: %d", __func__,
|
||||
peer_new_state);
|
||||
|
||||
if (peer_new_state == PEER_INVALID)
|
||||
return BGP_ERR_GR_INVALID_CMD;
|
||||
}
|
||||
|
||||
if (peer_new_state != peer_old_state) {
|
||||
result = peer_state.action_fun(peer, peer_old_state,
|
||||
|
@ -1446,11 +1446,11 @@ int bgp_peer_gr_init(struct peer *peer)
|
||||
{
|
||||
/* PEER_GLOBAL_INHERIT Mode */
|
||||
/* Event-> */ /* PEER_GR_CMD */ /* NO_PEER_GR_CMD */
|
||||
{ PEER_GR, bgp_peer_gr_action }, { PEER_INVALID, NULL },
|
||||
{ PEER_GR, bgp_peer_gr_action }, { PEER_GLOBAL_INHERIT, NULL },
|
||||
/* Event-> */ /* PEER_DISABLE_CMD */ /* NO_PEER_DISABLE_CMD */
|
||||
{ PEER_DISABLE, bgp_peer_gr_action}, { PEER_INVALID, NULL },
|
||||
{ PEER_DISABLE, bgp_peer_gr_action }, { PEER_GLOBAL_INHERIT, NULL },
|
||||
/* Event-> */ /* PEER_HELPER_cmd */ /* NO_PEER_HELPER_CMD */
|
||||
{ PEER_HELPER, bgp_peer_gr_action }, { PEER_INVALID, NULL }
|
||||
{ PEER_HELPER, bgp_peer_gr_action }, { PEER_GLOBAL_INHERIT, NULL }
|
||||
}
|
||||
};
|
||||
memcpy(&peer->PEER_GR_FSM, local_Peer_GR_FSM,
|
||||
|
Loading…
Reference in New Issue
Block a user