wireguard-functions.pl: Automatically skip IPv6 subnets
Commit Message
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 | 3 +++
1 file changed, 3 insertions(+)
@@ -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");
}