From: Stefan Schantl Date: Sun, 18 Jul 2021 09:30:54 +0000 (+0200) Subject: wio.cgi: Use new convert_to_cidr_or_mask() function. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67370d8fedc6445000b27e2bcfe2db42fbcbe9f0;p=people%2Fstevee%2Fipfire-2.x.git wio.cgi: Use new convert_to_cidr_or_mask() function. Signed-off-by: Stefan Schantl --- diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index 1dcec52fe2..36a2c0ec31 100644 --- a/src/wio/wio.cgi +++ b/src/wio/wio.cgi @@ -1557,7 +1557,8 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); foreach $key (keys(%vpnconfighash)) { next unless ($vpnconfighash{$key}[3] eq 'net'); - my $convertip = &General::ipcidr2msk($vpnconfighash{$key}[11]); + # Check and convert into subnetmask format. + my $convertip = &Network::convert_to_cidr_or_mask($vpnconfighash{$key}[11], "mask"); my @net = split ("/", $convertip); @@ -1583,7 +1584,8 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); if ( %ovpnccdconfhash ne '' ) { foreach $key (keys(%ovpnccdconfhash)) { - my $convertip = &General::ipcidr2msk($ovpnccdconfhash{$key}[1]); + # Check and convert into subnetmask format. + my $convertip = &Network::convert_to_cidr_or_mask($ovpnccdconfhash{$key}[1], "mask"); my @net = split ("/", $convertip); $vpnn2nip = $net[0];