From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH installer 8/8] unconfigured: try to retrieve IPv6 SLAAC addresses on startup
Date: Fri, 8 May 2026 20:44:11 +0200 [thread overview]
Message-ID: <20260508184546.113293-9-c.heiss@proxmox.com> (raw)
In-Reply-To: <20260508184546.113293-1-c.heiss@proxmox.com>
Uses `rdisc6` to send IPv6 router solicitations, in order to get
potential router advertisements. The kernel then auto-configures any
retrieved IPv6 address on the corresponding interface.
`rdnssd` is used to to retrieve IPv6 (recursive) DNS servers from these
router advertisements.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
debian/control | 2 ++
unconfigured.sh | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/debian/control b/debian/control
index 8049dd6..3c9de71 100644
--- a/debian/control
+++ b/debian/control
@@ -50,7 +50,9 @@ Depends: chrony,
libgtk3-perl,
libgtk3-webkit2-perl,
libjson-perl,
+ ndisc6,
proxmox-kernel-helper,
+ rdnssd,
squashfs-tools,
util-linux-extra,
${misc:Depends},
diff --git a/unconfigured.sh b/unconfigured.sh
index 7445ac4..02ace77 100755
--- a/unconfigured.sh
+++ b/unconfigured.sh
@@ -218,6 +218,16 @@ handle_wireless() {
fi
}
+# Iterates over all UP interfaces and sends a router solicitation on each.
+ipv6_send_router_solicitation() {
+ local devs
+ devs="$(ip -6 addr show scope link up | grep -oP '^\d+: \K\S+(?=:)')"
+
+ for dev in $devs; do
+ rdisc6 -1 --retry 1 "$dev" || true
+ done
+}
+
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
echo "Starting Proxmox installation"
@@ -311,6 +321,20 @@ echo -n "Attempting to get DHCP leases... "
dhclient -v
echo "done"
+# start rdnssd in the background first
+# the default merge hook just appends it to /etc/resolv.conf, which is what we want
+# also need to create the run-directory for rdnssd, otherwise it will silently
+# fail to write out new entries
+echo "Starting rdnssd for retrieving IPv6 nameservers..."
+mkdir -p /run/rdnssd
+rdnssd --merge-hook /etc/rdnssd/merge-hook --user root || echo "starting rdnssd failed ($?)"
+
+# check for IPv6 SLAAC by sending a router solicitation
+# rdnssd will pick up any nameservers, and the kernel interface addresses
+echo "Sending IPv6 router solicitations..."
+ipv6_send_router_solicitation
+echo "Done sending IPv6 router solicitations."
+
echo "Starting chrony for opportunistic time-sync... "
chronyd || echo "starting chrony failed ($?)"
--
2.53.0
prev 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 ` [PATCH RFC installer 6/8] sys: net: ignore ipv6 nameservers with zone identifiers Christoph Heiss
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 ` Christoph Heiss [this message]
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-9-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.