]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
proxy.cgi: Use new convert_to_cidr_or_mask() function.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 18 Jul 2021 09:30:25 +0000 (11:30 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 18 Jul 2021 09:30:25 +0000 (11:30 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/proxy.cgi

index 1b949d5b6853d1521897bc0b34924502bcf3956d..8ba1d025f71bb148b13389464f581c0e6c970ed1 100644 (file)
@@ -166,10 +166,13 @@ my $HAVE_NTLM_AUTH = (-e "/usr/bin/ntlm_auth");
 &General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
 
-my $green_cidr = &General::ipcidr("$netsettings{'GREEN_NETADDRESS'}\/$netsettings{'GREEN_NETMASK'}");
+# Get and convert green network into CIDR format.
+my $green_cidr = &Network::convert_to_cidr_or_mask("$netsettings{'GREEN_NETADDRESS'}\/$netsettings{'GREEN_NETMASK'}");
 my $blue_cidr = "";
+
+# If a blue zone exists, get and convert blue network into CIDR format.
 if (&Header::blue_used() && $netsettings{'BLUE_DEV'}) {
-       $blue_cidr = &General::ipcidr("$netsettings{'BLUE_NETADDRESS'}\/$netsettings{'BLUE_NETMASK'}");
+       $blue_cidr = &Network::convert_to_cidr_or_mask("$netsettings{'BLUE_NETADDRESS'}\/$netsettings{'BLUE_NETMASK'}");
 }
 
 &Header::showhttpheaders();