diff --git a/lib/20-community-net186.conf b/lib/20-community-net186.conf index e5311de..db57068 100644 --- a/lib/20-community-net186.conf +++ b/lib/20-community-net186.conf @@ -12,11 +12,11 @@ function net186_import_filter(int POPID) viaRegion = 0; # Route is via 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 viaRegion = viaRegion + 1; + 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)] || POP ~ [100, 300..310, 600] then viaRegion = viaRegion + 1; # Route is via or locate America - if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299), (LOCAL_ASN, 121, 200..299)] then viaRegion = viaRegion + 1; + if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299), (LOCAL_ASN, 121, 200..299)] || POP ~ [200..299] then viaRegion = viaRegion + 1; # Route is via or locate East Asia & Oceania - if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500), (LOCAL_ASN, 121, 200..299)] then viaRegion = viaRegion + 1; + if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500), (LOCAL_ASN, 121, 400..500)] || POP ~ [400..500] then viaRegion = viaRegion + 1; bgp_local_pref = bgp_local_pref - 50 * viaRegion;