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

index 8f13cf51fa294a3d8d871ccabe51b719514be1b3..b9d4d429302a6554e10cbbc38172adca3ac6c8f7 100644 (file)
@@ -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