Add: (LOCAL_ASN, 110, 30)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-12-28 09:51:41 +08:00
parent dcfe9c677a
commit 98c3e0be9f
4 changed files with 7 additions and 3 deletions

View File

@ -21,6 +21,9 @@ function pub_add_communities(int ASN; int PeerType) {
# DOWNSTREAM
} else if (PeerType=20) then {
if bgp_large_community !~ [(LOCAL_ASN, 110, *)] then bgp_large_community.add((LOCAL_ASN, 110, 20));
# Self Route
} else if (PeerType=30) then {
if bgp_large_community !~ [(LOCAL_ASN, 110, *)] then bgp_large_community.add((LOCAL_ASN, 110, 30));
}
# Finished (LOCAL_ASN, 110, *);
@ -98,7 +101,7 @@ function transit_export_filter(int ASN) {
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;
pub_add_communities(ASN, 10);
pub_add_communities(ASN, 30);
if pub_process_communities(ASN, 10) then return true;
else return false;
}