]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fixed snmp and bmp 'just Established' test. 6052/head
authorJosh Cox <josh.cox@pureport.com>
Thu, 19 Mar 2020 21:52:10 +0000 (17:52 -0400)
committerJosh Cox <josh.cox@pureport.com>
Thu, 19 Mar 2020 22:04:47 +0000 (18:04 -0400)
It was previously comparing an fsm event variable with an fsm status constant.
This fixes issue #5963.

Signed-off-by: Josh Cox <josh.cox@pureport.com>
bgpd/bgp_bmp.c
bgpd/bgp_snmp.c

index 24a9cab5d150f4dfe56963d9739c9b6f699118b8..32865da376a77625245e779905996fe74e559178 100644 (file)
@@ -664,8 +664,7 @@ static int bmp_peer_established(struct peer *peer)
                return 0;
 
        /* Check if this peer just went to Established */
-       if ((peer->last_major_event != OpenConfirm) ||
-           !(peer_established(peer)))
+       if ((peer->ostatus != OpenConfirm) || !(peer_established(peer)))
                return 0;
 
        if (peer->doppelganger && (peer->doppelganger->status != Deleted)) {
index d5071610523a633524a1ddd3ba5d399db75fc898..5cf0b73984dafbc23adf0d1d514543ab3135f3d4 100644 (file)
@@ -858,7 +858,7 @@ static int bgpTrapEstablished(struct peer *peer)
        oid index[sizeof(oid) * IN_ADDR_SIZE];
 
        /* Check if this peer just went to Established */
-       if ((peer->last_major_event != OpenConfirm) || !(peer_established(peer)))
+       if ((peer->ostatus != OpenConfirm) || !(peer_established(peer)))
                return 0;
 
        ret = inet_aton(peer->host, &addr);