17 lines
545 B
Plaintext
17 lines
545 B
Plaintext
function downstream_import_filter(int ASN) {
|
|
if !is_valid() then return false;
|
|
if delete(bgp_path, DOWNSTREAM_ASN).len != 0 then return false;
|
|
pub_add_communities(ASN, 20);
|
|
pub_preprocess_communities();
|
|
bgp_local_pref = 500 - bgp_path.len * 10;
|
|
pub_route_controller_specific();
|
|
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;
|
|
} |