Correctly check length of list. Credit to Bernhard Bitsch for pointing in the right direction. --- config/cfgroot/network-functions.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/config/cfgroot/network-functions.pl b/config/cfgroot/network-functions.pl index 2902aabb0..93bb646a6 100644 --- a/config/cfgroot/network-functions.pl +++ b/config/cfgroot/network-functions.pl @@ -111,8 +111,9 @@ sub network_equal { my @bin1 = &network2bin($network1); my @bin2 = &network2bin($network2);
- if (!defined $bin1 || !defined $bin2) { - return undef; + unless (scalar @bin1 == 2 && + scalar @bin2 == 2) { + return; }
if ($bin1[0] eq $bin2[0] && $bin1[1] eq $bin2[1]) {