diff options
author | aapostoliuk <a.apostoliuk@vyos.io> | 2024-04-08 16:51:33 +0300 |
---|---|---|
committer | aapostoliuk <a.apostoliuk@vyos.io> | 2024-04-08 17:10:48 +0300 |
commit | cd07d2be9d0d6e841fb75f67539862eb13b3cb35 (patch) | |
tree | c4da68c3e86e7ee18561b95a0703f1491bc92868 | |
parent | 5ea2b444f7672c475c7d241617a5bf4c411b1c52 (diff) | |
download | vyatta-cfg-quagga-cd07d2be9d0d6e841fb75f67539862eb13b3cb35.tar.gz vyatta-cfg-quagga-cd07d2be9d0d6e841fb75f67539862eb13b3cb35.zip |
T3437: Removed warning Perl messages after adding peer to confederation
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; + } } } |