diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-01-20 10:12:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 10:12:47 +0100 |
commit | f5c8073dddce2a1821b0f0c04599e4f3281b4a28 (patch) | |
tree | 9f9aace9be92888594c82f02e21b34cb70a37484 /bgpd | |
parent | Merge pull request #12350 from kuldeepkash/pim6_fixes (diff) | |
parent | bgpd: Skip RD match if ACCEPT_OWN is not enabled (diff) | |
download | frr-f5c8073dddce2a1821b0f0c04599e4f3281b4a28.tar.xz frr-f5c8073dddce2a1821b0f0c04599e4f3281b4a28.zip |
Merge pull request #12669 from proelbtn/fix-accept-own-rd-check
bgpd: Skip RD match if ACCEPT_OWN excended community is not attached
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_mplsvpn.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 7feaf7d1c..288115f21 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -1907,8 +1907,9 @@ static bool vpn_leak_to_vrf_update_onevrf(struct bgp *to_bgp, /* to */ /* A route MUST NOT ever be accepted back into its source VRF, even if * it carries one or more RTs that match that VRF. */ - if (prd && memcmp(&prd->val, &to_bgp->vpn_policy[afi].tovpn_rd.val, - ECOMMUNITY_SIZE) == 0) { + if (CHECK_FLAG(path_vpn->flags, BGP_PATH_ACCEPT_OWN) && prd && + memcmp(&prd->val, &to_bgp->vpn_policy[afi].tovpn_rd.val, + ECOMMUNITY_SIZE) == 0) { if (debug) zlog_debug( "%s: skipping import, match RD (%pRD) of src VRF (%s) and the prefix (%pFX)", |