]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Inconsistency in Local BGP GR state.
authorprerana <prerana@vmware.com>
Fri, 9 Jul 2021 07:20:15 +0000 (00:20 -0700)
committermergify-bot <noreply@mergify.io>
Tue, 13 Jul 2021 15:41:14 +0000 (15:41 +0000)
Problem: Sometimes the configured Local GR state is not reflected in
show command and peer node. This is causing failures in few of the
BGP-GR topotests.

RCA: This problem is seen when the configuration of local GR state
happens when the BGP session is in OpenSent state and  moves to
Established after the configuration is complete.
When the session gets established, we move the GR state value from stub peer
to the config peer. This will result in overriding the GR state to
previous value.

Fix: The local GR state is modified only through CLI configuration and
does not change during BGP FSM transition. In this case it is not necessary
to transfer the GR state value from stub peer to config peer. This way we
can ensure that always the most recent config value is present in peer
datastructure.

Signed-off-by: Prerana-GB <prerana@vmware.com>
(cherry picked from commit 3f98a750c29bfce5e5d7ffa36fe5c0b1554d7b7a)

bgpd/bgp_fsm.c

index e54f0240fd42a0169f99d1da31e91e36c1b4b147..20c61fec575143850103fff5015b639cb2cc5637 100644 (file)
@@ -258,10 +258,6 @@ static struct peer *peer_xfer_conn(struct peer *from_peer)
        peer->last_reset = from_peer->last_reset;
        peer->max_packet_size = from_peer->max_packet_size;
 
-       peer->peer_gr_present_state = from_peer->peer_gr_present_state;
-       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);