Update: filter: if route located on other region, export will prepend 1x
continuous-integration/drone/push Build is passing Details

This commit is contained in:
186526 2022-12-29 17:56:01 +08:00
parent 4eb7327648
commit d59bc5feb1
1 changed files with 6 additions and 6 deletions

View File

@ -78,12 +78,12 @@ function pub_process_communities(int ASN; int PeerType) {
function pub_process_path() {
# Delete Self eBGP Confed Path.
bgp_path.delete([4200000000..4225479999]);
# Route is via Europe & Africa & Middle East
if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600)] then bgp_path.prepend(LOCAL_ASN);
# Route is via America
if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299)] then bgp_path.prepend(LOCAL_ASN);
# Route is via East Asia & Oceania
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500)] then bgp_path.prepend(LOCAL_ASN);
# Route is via or locate Europe & Africa & Middle East
if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600), (LOCAL_ASN, 121, 100), (LOCAL_ASN, 121, 300..310), (LOCAL_ASN, 121, 600)] then bgp_path.prepend(LOCAL_ASN);
# Route is via or locate America
if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299), (LOCAL_ASN, 121, 200..299)] then bgp_path.prepend(LOCAL_ASN);
# Route is via or locate East Asia & Oceania
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500), (LOCAL_ASN, 121, 200..299)] then bgp_path.prepend(LOCAL_ASN);
# Self PoP
if (LOCAL_ASN, 120, POP) ~ bgp_large_community then bgp_path.delete(LOCAL_ASN);
}