summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/bgp/vyatta-bgp.pl11
-rw-r--r--templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def2
2 files changed, 7 insertions, 6 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl
index bf289511..7e276231 100755
--- a/scripts/bgp/vyatta-bgp.pl
+++ b/scripts/bgp/vyatta-bgp.pl
@@ -1138,7 +1138,7 @@ my %qcom = (
);
my ( $pg, $as, $neighbor );
-my ( $main, $peername, $isneighbor, $checkpeergroups, $checksource, $isIBGPpeer, $checkforibgpasn);
+my ( $main, $peername, $isneighbor, $checkpeergroups, $checksource, $isIBGPpeer, $confedibgpasn);
GetOptions(
"peergroup=s" => \$pg,
@@ -1149,7 +1149,7 @@ GetOptions(
"check-peer-groups" => \$checkpeergroups,
"check-source=s" => \$checksource,
"is-iBGP" => \$isIBGPpeer,
- "check-for-iBGP-ASN=s" => \$checkforibgpasn,
+ "confed-iBGP-ASN-check=s" => \$confedibgpasn,
"main" => \$main,
);
@@ -1158,7 +1158,7 @@ check_peergroup_name($peername) if ($peername);
check_neighbor_ip($neighbor) if ($isneighbor);
check_for_peer_groups( $pg, $as ) if ($checkpeergroups);
check_source($checksource) if ($checksource);
-check_for_iBGP_ASN($as, $checkforibgpasn) if ($checkforibgpasn);
+confed_iBGP_ASN($as, $confedibgpasn) if ($confedibgpasn);
is_IBGP_peer($neighbor, $as) if ($isIBGPpeer);
@@ -1296,8 +1296,9 @@ sub check_remote_as {
}
-# check to see if this ASN will make a peer an iBGP peer
-sub check_for_iBGP_ASN {
+# check to see if adding this ASN to confederations
+# will make a peer an iBGP peer
+sub confed_iBGP_ASN {
my ($as, $testas) = @_;
if ("$as" eq "$testas") { exit 1 ; }
diff --git a/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def b/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def
index 52823424..e806b5d7 100644
--- a/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def
+++ b/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def
@@ -3,4 +3,4 @@ type: u32
help: Peer ASs in the BGP confederation
val_help: u32:1-4294967294; Peer AS number numbers (ex: "435 234")
syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "confederation AS id must be between 1 and 4294967294"
-commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-for-iBGP-ASN $VAR(@) --as $VAR(../../../@)"; "Can't set confederation peers ASN to $VAR(@). Delete any neighbors with remote-as $VAR(@) and/or change the local ASN first."
+commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --confed-iBGP-ASN-check $VAR(@) --as $VAR(../../../@)"; "Can't set confederation peers ASN to $VAR(@). Delete any neighbors with remote-as $VAR(@) and/or change the local ASN first."