Update: update filter
parent
d59bc5feb1
commit
02e2a82814
|
@ -85,7 +85,10 @@ function pub_process_path() {
|
|||
# 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);
|
||||
if (LOCAL_ASN, 120, POP) ~ bgp_large_community then {
|
||||
bgp_path.delete(LOCAL_ASN);
|
||||
bgp_path.prepend(LOCAL_ASN);
|
||||
}
|
||||
}
|
||||
|
||||
function transit_import_filter(int ASN) {
|
||||
|
@ -100,7 +103,10 @@ function transit_export_filter(int ASN) {
|
|||
pub_process_path();
|
||||
if !is_valid() then return false;
|
||||
if bgp_large_community ~ [(LOCAL_ASN, 110, 0), (LOCAL_ASN, 110, 10)] then return false;
|
||||
if bgp_path.last !~ DOWNSTREAM_ASN && source = RTS_BGP then return false;
|
||||
if bgp_path.last !~ DOWNSTREAM_ASN && source = RTS_BGP then {
|
||||
print "transit exporter: for ", net, " ASN ", bgp_path.last;
|
||||
return false;
|
||||
}
|
||||
pub_add_communities(ASN, 30);
|
||||
if pub_process_communities(ASN, 10) then return true;
|
||||
else return false;
|
||||
|
|
Loading…
Reference in New Issue