]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
wireguard-functions.pl: Automatically skip IPv6 subnets
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Jul 2025 08:42:12 +0000 (08:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Jul 2025 09:25:26 +0000 (09:25 +0000)
Since we do not support this and some VPN providers generate
configuration files that send any data over to them, we simply ignore
any IPv6 subnets.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cfgroot/wireguard-functions.pl

index e6b5e08bad68779e430cd7cfc23571e9b4b709df..f98cec40840d558b534c182e8e268fa16e4e8b37 100644 (file)
@@ -570,6 +570,9 @@ sub parse_configuration($$) {
 
                                # Check if all networks are valid
                                foreach my $network (@networks) {
+                                       # Skip any IPv6 networks
+                                       next if ($network =~ m/:/);
+
                                        unless (&Network::check_subnet($network)) {
                                                push(@errormessages, $Lang::tr{'invalid network'} . " $network");
                                        }