production
186526 2023-01-09 17:36:50 +08:00
parent 7c4341a317
commit a9de9d9a89
1 changed files with 3 additions and 3 deletions

View File

@ -12,11 +12,11 @@ function net186_import_filter(int POPID)
viaRegion = 0; viaRegion = 0;
# Route is via Europe & Africa & Middle East # 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 # 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 # 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; bgp_local_pref = bgp_local_pref - 50 * viaRegion;