all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH RFC installer 6/8] sys: net: ignore ipv6 nameservers with zone identifiers
Date: Fri,  8 May 2026 20:44:09 +0200	[thread overview]
Message-ID: <20260508184546.113293-7-c.heiss@proxmox.com> (raw)
In-Reply-To: <20260508184546.113293-1-c.heiss@proxmox.com>

The stack does not handle IPv6 addresses with zone identifiers anywhere
(yet).

Just dropping the zone identifier would be another possibility for now,
but would probably break more things (as they are e.g. pretty much
mandantory for link-local addresses.)

IPv6 addresses with zone identifiers are not all that well supported and
are uncommon anyway it seems, see [0][1][2].

For now, work around that by ignoring all IPv6 nameservers with zone
identifiers.

[0] https://github.com/containers/common/pull/2233
[1] https://github.com/containers/aardvark-dns/issues/535
[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255316

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Sending as RFC as it is a rather ugly hack, but reworking the rest of
the stack is a bit more effort and wanted to send the series now.

Mainly fails due to parsing it as a `std::net::IpAddr` addresses in
Rust, which does not support zone identifiers, in addition to
Proxmox::Sys::Net::parse_ip_address() not recognizing them either.

 Proxmox/Sys/Net.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Proxmox/Sys/Net.pm b/Proxmox/Sys/Net.pm
index c6bd841..4781e51 100644
--- a/Proxmox/Sys/Net.pm
+++ b/Proxmox/Sys/Net.pm
@@ -334,7 +334,14 @@ sub query_dns : prototype() {
     my $domain;
     while (defined(my $line = <$fh>)) {
         if ($line =~ /^nameserver\s+(\S+)/) {
-            push @dns, $1;
+            # FIXME: handle IPv6 zone identifiers across the stack.
+            # For now, ignore all addresses containing them.
+            my $addr = $1;
+            if ($addr =~ /%\S+$/) {
+                log_warn("skipping nameserver $addr as being link-local");
+            } else {
+                push @dns, $addr;
+            }
         } elsif (!defined($domain) && $line =~ /^domain\s+(\S+)/) {
             $domain = $1;
         }
-- 
2.53.0





  parent reply	other threads:[~2026-05-08 18:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 18:44 [PATCH installer 0/8] add IPv6 SLAAC and v6-only support Christoph Heiss
2026-05-08 18:44 ` [PATCH installer 1/8] install: drop trivial fromjs() wrapper and use JSON::from_json() Christoph Heiss
2026-05-08 18:44 ` [PATCH installer 2/8] install: move network subroutines to Proxmox::Sys::Net Christoph Heiss
2026-05-08 18:44 ` [PATCH installer 3/8] gui: use run_env->{network} instead of old run_env->{ipconf} Christoph Heiss
2026-05-08 18:44 ` [PATCH installer 4/8] sys: net: drop the now-unused `ipconf` runtime environment configuration Christoph Heiss
2026-05-08 18:44 ` [PATCH installer 5/8] sys: net: allow up to /128 netmask for IPv6 Christoph Heiss
2026-05-08 18:44 ` Christoph Heiss [this message]
2026-05-08 18:44 ` [PATCH installer 7/8] common: options: rework network address setup to handle ipv6-only Christoph Heiss
2026-05-08 18:44 ` [PATCH installer 8/8] unconfigured: try to retrieve IPv6 SLAAC addresses on startup Christoph Heiss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260508184546.113293-7-c.heiss@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal