summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-11 16:07:13 +0200
committerGitHub <noreply@github.com>2024-04-11 16:07:13 +0200
commit2f7918a1536d567bdf3f72cab63e4db3fbce49a1 (patch)
treec4da68c3e86e7ee18561b95a0703f1491bc92868
parent5ea2b444f7672c475c7d241617a5bf4c411b1c52 (diff)
parentcd07d2be9d0d6e841fb75f67539862eb13b3cb35 (diff)
downloadvyatta-cfg-quagga-2f7918a1536d567bdf3f72cab63e4db3fbce49a1.tar.gz
vyatta-cfg-quagga-2f7918a1536d567bdf3f72cab63e4db3fbce49a1.zip
Merge pull request #104 from aapostoliuk/T3437-equuleus1.3.81.3.7equuleus
T3437: Removed warning Perl messages after adding peer to confederation
-rwxr-xr-xscripts/bgp/vyatta-bgp.pl18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl
index ba5cb033..e206fc3f 100755
--- a/scripts/bgp/vyatta-bgp.pl
+++ b/scripts/bgp/vyatta-bgp.pl
@@ -1706,16 +1706,22 @@ sub confed_iBGP_ASN {
my @neighbors = $config->listOrigNodes('neighbor');
foreach my $neighbor (@neighbors) {
my $remoteas = $config->returnValue("neighbor $neighbor remote-as");
- if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) {
- exit 1;
+ if (defined $remoteas) {
+ if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) {
+ exit 1;
+ }
}
$remoteas = $config->returnValue("neighbor $neighbor interface remote-as");
- if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) {
- exit 1;
+ if (defined $remoteas) {
+ if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) {
+ exit 1;
+ }
}
$remoteas = $config->returnValue("neighbor $neighbor interface v6only remote-as");
- if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) {
- exit 1;
+ if (defined $remoteas) {
+ if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) {
+ exit 1;
+ }
}
}