Skip to content

Commit e9b5164

Browse files
Josh Coxgpziemba
Josh Cox
authored andcommitted
bgpd: Fixed snmp and bmp 'just Established' test.
It was previously comparing an fsm event variable with an fsm status constant. This fixes issue FRRouting#5963. Signed-off-by: Josh Cox <[email protected]>
1 parent 873e658 commit e9b5164

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

bgpd/bgp_bmp.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,7 @@ static int bmp_peer_established(struct peer *peer)
664664
return 0;
665665

666666
/* Check if this peer just went to Established */
667-
if ((peer->last_major_event != OpenConfirm) ||
668-
!(peer_established(peer)))
667+
if ((peer->ostatus != OpenConfirm) || !(peer_established(peer)))
669668
return 0;
670669

671670
if (peer->doppelganger && (peer->doppelganger->status != Deleted)) {

bgpd/bgp_snmp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ static int bgpTrapEstablished(struct peer *peer)
858858
oid index[sizeof(oid) * IN_ADDR_SIZE];
859859

860860
/* Check if this peer just went to Established */
861-
if ((peer->last_major_event != OpenConfirm) || !(peer_established(peer)))
861+
if ((peer->ostatus != OpenConfirm) || !(peer_established(peer)))
862862
return 0;
863863

864864
ret = inet_aton(peer->host, &addr);

0 commit comments

Comments
 (0)