Replace textual comparison of two number with arithmetic in ip_address_in_Network().
Fixes: 12263 Signed-off-by: Tim FitzGeorge ipfr@tfitzgeorge.me.uk --- config/cfgroot/network-functions.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/cfgroot/network-functions.pl b/config/cfgroot/network-functions.pl index 8649d0502..589044c2a 100644 --- a/config/cfgroot/network-functions.pl +++ b/config/cfgroot/network-functions.pl @@ -295,7 +295,7 @@ sub ip_address_in_network($$) { # Find end address my $broadcast_bin = $network_bin ^ (~$netmask_bin % 2 ** 32);
- return (($address_bin ge $network_bin) && ($address_bin le $broadcast_bin)); + return (($address_bin => $network_bin) && ($address_bin <= $broadcast_bin)); }
sub setup_upstream_proxy() {