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 <[email protected]>
---
 config/cfgroot/wireguard-functions.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/cfgroot/wireguard-functions.pl 
b/config/cfgroot/wireguard-functions.pl
index e6b5e08ba..f98cec408 100644
--- a/config/cfgroot/wireguard-functions.pl
+++ b/config/cfgroot/wireguard-functions.pl
@@ -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");
                                        }
-- 
2.39.5


Reply via email to