diff options
author | Christian Breunig <christian@breunig.cc> | 2024-04-11 16:07:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 16:07:13 +0200 |
commit | 2f7918a1536d567bdf3f72cab63e4db3fbce49a1 (patch) | |
tree | c4da68c3e86e7ee18561b95a0703f1491bc92868 | |
parent | 5ea2b444f7672c475c7d241617a5bf4c411b1c52 (diff) | |
parent | cd07d2be9d0d6e841fb75f67539862eb13b3cb35 (diff) | |
download | vyatta-cfg-quagga-2f7918a1536d567bdf3f72cab63e4db3fbce49a1.tar.gz vyatta-cfg-quagga-2f7918a1536d567bdf3f72cab63e4db3fbce49a1.zip |
T3437: Removed warning Perl messages after adding peer to confederation
-rwxr-xr-x | scripts/bgp/vyatta-bgp.pl | 18 |
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; + } } } |