Files
net186-config/lib/20-community-downstream.conf
186526 98c3e0be9f
All checks were successful
continuous-integration/drone/push Build is passing
Add: (LOCAL_ASN, 110, 30)
2022-12-28 09:51:41 +08:00

16 lines
498 B
Plaintext

function downstream_import_filter(int ASN) {
if !is_valid() then return false;
if bgp_path.last !~ DOWNSTREAM_ASN then return false;
pub_add_communities(ASN, 20);
pub_preprocess_communities();
bgp_local_pref = 500 - bgp_path.len * 10;
return true;
}
function downstream_export_filter(int ASN) {
pub_process_path();
if !is_valid() then return false;
pub_add_communities(ASN, 30);
if pub_process_communities(ASN, 20) then return true;
else return false;
}