From: Stefan Schantl Date: Sun, 18 Jul 2021 09:30:38 +0000 (+0200) Subject: vpnmain.cgi: Use new convert_to_cidr_or_mask() function. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16404ee6f54be638e7ab25d4c515204cc7dcec8f;p=people%2Fstevee%2Fipfire-2.x.git vpnmain.cgi: Use new convert_to_cidr_or_mask() function. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 8f13cf51fa..b9d4d42930 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -3782,7 +3782,9 @@ sub make_subnets($$) { my @nets = split(/\|/, $subnets); my @cidr_nets = (); foreach my $net (@nets) { - my $cidr_net = &General::ipcidr($net); + # Use function from Network lib to check and convert the network + # into the CIDR format. IPsec requires this! + my $cidr_net = &Network::convert_to_cidr_or_mask($net, "cidr"); # Skip 0.0.0.0/0 for remote because this renders the # while system inaccessible