summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_bmp.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-06-07 15:39:10 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-06-07 16:48:36 +0200
commitfeb172384663a38b35d170a86dcfd147bd21efe6 (patch)
tree6e99af8779634dcb333961410c4af45e569630c1 /bgpd/bgp_bmp.c
parentMerge pull request #8778 from idryzhov/fix-zebra-vrf (diff)
downloadfrr-feb172384663a38b35d170a86dcfd147bd21efe6.tar.xz
frr-feb172384663a38b35d170a86dcfd147bd21efe6.zip
bgpd: Convert to using peer_established(peer) function
We are inconsistently using peer_establiahed(peer) with sometimes using `peer->status == Established`. Just Convert over to using the function for consistency. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_bmp.c')
-rw-r--r--bgpd/bgp_bmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index abe97571c..dbc35de80 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -365,7 +365,7 @@ static struct stream *bmp_peerstate(struct peer *peer, bool down)
#define BGP_BMP_MAX_PACKET_SIZE 1024
s = stream_new(BGP_MAX_PACKET_SIZE);
- if (peer->status == Established && !down) {
+ if (peer_established(peer) && !down) {
struct bmp_bgp_peer *bbpeer;
bmp_common_hdr(s, BMP_VERSION_3,
@@ -1146,7 +1146,7 @@ static bool bmp_wrqueue(struct bmp *bmp, struct pullwr *pullwr)
zlog_info("bmp: skipping queued item for deleted peer");
goto out;
}
- if (peer->status != Established)
+ if (!peer_established(peer))
goto out;
bn = bgp_node_lookup(bmp->targets->bgp->rib[afi][safi], &bqe->p);
@@ -1323,7 +1323,7 @@ static int bmp_stats(struct thread *thread)
for (ALL_LIST_ELEMENTS_RO(bt->bgp->peer, node, peer)) {
size_t count = 0, count_pos, len;
- if (peer->status != Established)
+ if (!peer_established(peer))
continue;
s = stream_new(BGP_MAX_PACKET_SIZE);