Fix: error in 10-community-transit.conf
parent
9acba2dedd
commit
da053bc212
|
@ -1,21 +1,20 @@
|
|||
function pub_add_communities(int ASN, int type) {
|
||||
|
||||
function pub_add_communities(int ASN; int PeerType) {
|
||||
# DIRECT PEER
|
||||
if (type=0) then {
|
||||
if (PeerType=0) then {
|
||||
bgp_large_community.add((LOCAL_ASN, 110, 0));
|
||||
bgp_large_community.add((LOCAL_ASN, 110, 2));
|
||||
|
||||
# PEER via IX
|
||||
} else if (type=1) then {
|
||||
} else if (PeerType=1) then {
|
||||
bgp_large_community.add((LOCAL_ASN, 110, 0));
|
||||
bgp_large_community.add((LOCAL_ASN, 110, 1));
|
||||
j
|
||||
|
||||
# UPSTREAM
|
||||
}else if (type=10) then {
|
||||
}else if (PeerType=10) then {
|
||||
bgp_large_community.add((LOCAL_ASN, 110, 10));
|
||||
|
||||
# DOWNSTREAM
|
||||
} else if (type=20) then {
|
||||
} else if (PeerType=20) then {
|
||||
bgp_large_community.add((LOCAL_ASN, 110, 20));
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ function pub_preprocess_communities() {
|
|||
# Finished (LOCAL_ASN, 115, *);
|
||||
}
|
||||
|
||||
function pub_process_communities(int ASN, int type) {
|
||||
function pub_process_communities(int ASN; int PeerType) {
|
||||
|
||||
if (LOCAL_ASN, 125, POP) ~ bgp_large_community then {
|
||||
bgp_community.add((65535, 65282));
|
||||
|
@ -58,18 +57,18 @@ function pub_process_communities(int ASN, int type) {
|
|||
if (65535, 65282) ~ bgp_community then return false;
|
||||
if (65535, 65283) ~ bgp_community then return false;
|
||||
|
||||
if (LOCAL_ASN, 2, ASN) ~ bgp_large_community then reject
|
||||
if (LOCAL_ASN, 2, ASN) ~ bgp_large_community then return false;
|
||||
|
||||
# PEER
|
||||
if (type<10) then {
|
||||
if (PeerType<10) then {
|
||||
if (LOCAL_ASN, 1, 1) ~ bgp_large_community then return false;
|
||||
|
||||
# UPSTREAM
|
||||
} else if (type=10) then {
|
||||
} else if (PeerType=10) then {
|
||||
if (LOCAL_ASN, 1, 0) ~ bgp_large_community then return false;
|
||||
|
||||
# DOWNSTREAM
|
||||
} else if (type=20) then {
|
||||
} else if (PeerType=20) then {
|
||||
if (LOCAL_ASN, 1, 2) ~ bgp_large_community then return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue