diff options
| author | Josh Cox <josh.cox@pureport.com> | 2020-03-19 17:52:10 -0400 |
|---|---|---|
| committer | Josh Cox <josh.cox@pureport.com> | 2020-03-19 18:04:47 -0400 |
| commit | fd2e2db68040223c2851394e3791c433ece7ca16 (patch) | |
| tree | 4bcebde3de3dec1fc9713b429cf00b2081ef4dc5 | |
| parent | 9c23deece23e7684f3bd6cd556b4d4ba4a4d2047 (diff) | |
bgpd: Fixed snmp and bmp 'just Established' test.
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>
| -rw-r--r-- | bgpd/bgp_bmp.c | 3 | ||||
| -rw-r--r-- | bgpd/bgp_snmp.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index 24a9cab5d1..32865da376 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -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)) { diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index d507161052..5cf0b73984 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -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); |
