From d59bc5feb1d6e1feeaff61cf127abe088b9e5d29 Mon Sep 17 00:00:00 2001 From: 186526 Date: Thu, 29 Dec 2022 17:56:01 +0800 Subject: [PATCH] Update: filter: if route located on other region, export will prepend 1x --- lib/10-community-transit.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/10-community-transit.conf b/lib/10-community-transit.conf index dc4371b..63ef336 100644 --- a/lib/10-community-transit.conf +++ b/lib/10-community-transit.conf @@ -78,12 +78,12 @@ function pub_process_communities(int ASN; int PeerType) { function pub_process_path() { # Delete Self eBGP Confed Path. bgp_path.delete([4200000000..4225479999]); - # Route is via Europe & Africa & Middle East - if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600)] then bgp_path.prepend(LOCAL_ASN); - # Route is via America - if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299)] then bgp_path.prepend(LOCAL_ASN); - # Route is via East Asia & Oceania - if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500)] then bgp_path.prepend(LOCAL_ASN); + # Route is via or locate Europe & Africa & Middle East + if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600), (LOCAL_ASN, 121, 100), (LOCAL_ASN, 121, 300..310), (LOCAL_ASN, 121, 600)] then bgp_path.prepend(LOCAL_ASN); + # Route is via or locate America + if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299), (LOCAL_ASN, 121, 200..299)] then bgp_path.prepend(LOCAL_ASN); + # Route is via or locate East Asia & Oceania + if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500), (LOCAL_ASN, 121, 200..299)] then bgp_path.prepend(LOCAL_ASN); # Self PoP if (LOCAL_ASN, 120, POP) ~ bgp_large_community then bgp_path.delete(LOCAL_ASN); }