Merge pull request #11691 from mxyns/bmp-vpnv4monupd-fix

bgpd: fixed bmp vpnv4 monitoring sending withdraws instead of updates
This commit is contained in:
Donald Sharp 2022-08-01 07:49:18 -04:00 committed by GitHub
commit ad9b47e65e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1183,11 +1183,13 @@ static bool bmp_wrqueue(struct bmp *bmp, struct pullwr *pullwr)
if (!peer_established(peer))
goto out;
bn = bgp_node_lookup(bmp->targets->bgp->rib[afi][safi], &bqe->p);
struct prefix_rd *prd = NULL;
if ((bqe->afi == AFI_L2VPN && bqe->safi == SAFI_EVPN) ||
(bqe->safi == SAFI_MPLS_VPN))
prd = &bqe->rd;
bool is_vpn = (bqe->afi == AFI_L2VPN && bqe->safi == SAFI_EVPN) ||
(bqe->safi == SAFI_MPLS_VPN);
struct prefix_rd *prd = is_vpn ? &bqe->rd : NULL;
bn = bgp_afi_node_lookup(bmp->targets->bgp->rib[afi][safi], afi, safi,
&bqe->p, prd);
if (bmp->targets->afimon[afi][safi] & BMP_MON_POSTPOLICY) {
struct bgp_path_info *bpi;