Update: Filter & readme.md
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-12-29 15:15:11 +08:00
parent a6c953b9bd
commit ae794304c4
2 changed files with 26 additions and 5 deletions

View File

@ -18,7 +18,7 @@ function net186_import_filter(int POPID)
# Route is via East Asia & Oceania
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500)] then viaRegion = viaRegion + 1;
if viaRegion >= 3 then bgp_local_pref = bgp_local_pref - 50;
if viaRegion >= 2 then bgp_local_pref = bgp_local_pref - 50 * viaRegion;
# Route is via China mainland but not advertise in China mainland.
if (LOCAL_ASN, 122, 430) ~ bgp_large_community && REGION != 430 && (LOCAL_ASN, 120, 430) ~ bgp_large_community then return false;