Add: complete the filter of internal network and downstream
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-12-27 15:31:54 +08:00
parent fdc14ca1cc
commit db8827f83e
7 changed files with 54 additions and 48 deletions

View File

@ -1,4 +1,4 @@
function net186_import_filter (int POPID)
function net186_import_filter(int POPID)
int viaRegion;
bgppath public_bgp_path;
{
@ -29,7 +29,7 @@ function net186_import_filter (int POPID)
bgp_local_pref = bgp_local_pref - filter(bgp_large_community, [(LOCAL_ASN, 122, *)]).len * 10;
};
function net186_export_filter (int POPID) {
function net186_export_filter(int POPID) {
if (65535, 65282) ~ bgp_community then return false;
if (65535, 65283) ~ bgp_community then {
@ -37,4 +37,14 @@ function net186_export_filter (int POPID) {
return false;
}
}
if (LOCAL_ASN, 125, POP) ~ bgp_large_community then {
return false;
}
if (LOCAL_ASN, 126, REGION) ~ bgp_large_community then {
return false;
}
return true;
};