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

@ -9,17 +9,17 @@ function is_peer_route() {
function direct_peer_import_filter(int ASN) {
if !is_valid() then return false;
if !is_peer_route() then return false;
pub_add_communities(ASN, 0);
pub_preprocess_communities();
if !is_peer_route() then return false;
return true;
}
function direct_peer_export_filter(int ASN) {
# Delete Self eBGP Confed Path.
bgp_path.delete([4200000000..4225479999]);
if !is_valid() then return false;
# Delete Self eBGP Confed Path.
pub_process_communities(ASN, 10);
if !is_peer_route() then return false;
return true;
if pub_process_communities(ASN, 0) then return true;
else return false;
}