2022-12-27 07:31:54 +00:00
|
|
|
function downstream_import_filter(int ASN) {
|
|
|
|
if !is_valid() then return false;
|
2023-01-12 13:23:56 +00:00
|
|
|
if delete(bgp_path, DOWNSTREAM_ASN).len != 0 then return false;
|
2022-12-27 07:31:54 +00:00
|
|
|
pub_add_communities(ASN, 20);
|
|
|
|
pub_preprocess_communities();
|
2022-12-27 17:14:15 +00:00
|
|
|
bgp_local_pref = 500 - bgp_path.len * 10;
|
2023-01-09 14:46:30 +00:00
|
|
|
pub_route_controller_specific();
|
2022-12-27 07:31:54 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
function downstream_export_filter(int ASN) {
|
2022-12-27 17:14:15 +00:00
|
|
|
pub_process_path();
|
2022-12-27 07:31:54 +00:00
|
|
|
if !is_valid() then return false;
|
2022-12-28 01:51:41 +00:00
|
|
|
pub_add_communities(ASN, 30);
|
2022-12-27 07:31:54 +00:00
|
|
|
if pub_process_communities(ASN, 20) then return true;
|
|
|
|
else return false;
|
|
|
|
}
|