From 67370d8fedc6445000b27e2bcfe2db42fbcbe9f0 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sun, 18 Jul 2021 11:30:54 +0200 Subject: [PATCH] wio.cgi: Use new convert_to_cidr_or_mask() function. Signed-off-by: Stefan Schantl --- src/wio/wio.cgi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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]; -- 2.39.5