public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] wireguard-functions.pl: Automatically skip IPv6 subnets
@ 2025-07-18  8:42 Michael Tremer
  0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2025-07-18  8:42 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

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(+)

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-18  8:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-18  8:42 [PATCH] wireguard-functions.pl: Automatically skip IPv6 subnets Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox