summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-01-20 10:12:47 +0100
committerGitHub <noreply@github.com>2023-01-20 10:12:47 +0100
commitf5c8073dddce2a1821b0f0c04599e4f3281b4a28 (patch)
tree9f9aace9be92888594c82f02e21b34cb70a37484 /bgpd
parentMerge pull request #12350 from kuldeepkash/pim6_fixes (diff)
parentbgpd: Skip RD match if ACCEPT_OWN is not enabled (diff)
downloadfrr-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.c5
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)",