diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-08-26 18:11:07 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-09-10 08:31:25 -0400 | 
| commit | 7b1158b169f59729bdde704539371cd419fe2138 (patch) | |
| tree | 99838f12681fb1d1afad8600505fb68717e8f78d /bgpd/bgp_bmp.c | |
| parent | d1e7215da064eab02be7c1874cab27a6b7d0cacf (diff) | |
bgpd: peer_established should be connection oriented
The peer_established function should be connection oriented.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_bmp.c')
| -rw-r--r-- | bgpd/bgp_bmp.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index 9821dcf7bb..c0f9a9a732 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -370,7 +370,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_established(peer) && !down) { +	if (peer_established(peer->connection) && !down) {  		struct bmp_bgp_peer *bbpeer;  		bmp_common_hdr(s, BMP_VERSION_3, @@ -716,7 +716,7 @@ static int bmp_peer_status_changed(struct peer *peer)  	/* Check if this peer just went to Established */  	if ((peer->connection->ostatus != OpenConfirm) || -	    !(peer_established(peer))) +	    !(peer_established(peer->connection)))  		return 0;  	if (peer->doppelganger && @@ -1170,7 +1170,7 @@ static bool bmp_wrqueue(struct bmp *bmp, struct pullwr *pullwr)  		zlog_info("bmp: skipping queued item for deleted peer");  		goto out;  	} -	if (!peer_established(peer)) +	if (!peer_established(peer->connection))  		goto out;  	bool is_vpn = (bqe->afi == AFI_L2VPN && bqe->safi == SAFI_EVPN) || @@ -1355,7 +1355,7 @@ static void bmp_stats(struct event *thread)  	for (ALL_LIST_ELEMENTS_RO(bt->bgp->peer, node, peer)) {  		size_t count = 0, count_pos, len; -		if (!peer_established(peer)) +		if (!peer_established(peer->connection))  			continue;  		s = stream_new(BGP_MAX_PACKET_SIZE);  | 
