From: Filip Schauer <f.schauer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH container/lxc v3 0/2] fix #7388: prefer container DNS config over host-managed DHCP
Date: Tue, 1 Dec 2026 16:33:42 +0100 [thread overview]
Message-ID: <20261201153346.163922-1-f.schauer@proxmox.com> (raw)
For host-managed interfaces with ip=dhcp, dhclient-script rewrites
/etc/resolv.conf with the DNS settings offered by the DHCP server. This
silently overrides the container's nameserver/searchdomain options.
The lxc patch lets dhclient-script ignore the DHCP-supplied nameservers
or search domains when told to. The pve-container patch passes that
request to dhclient when the container config sets the respective
options.
The pve-container patch depends on the lxc one. So lxc-pve needs to be
bumped for the changes to take effect.
Changed since v2:
* Drop the custom dhclient config file approach.
Handle the DNS precedence in dhclient-script instead, controlled by
environment variables.
Changed since v1:
* Rebased onto pve-container 6.1.29
* Anchor $IPV4RE $IPV6RE regexes
* Remove redundant `sysseek` call
* Only generate the config on 'start', not on 'stop'
* Use the host's /etc/dhcp/dhclient.conf as the base config
lxc:
Filip Schauer (1):
oida
...fig-deny-rw-mounting-of-sys-and-proc.patch | 2 +-
...-PVE-Config-attach-always-use-getent.patch | 2 +-
...-script-set-RFC3442-classless-routes.patch | 2 +-
...4-dhclient-script-allow-ignoring-dns.patch | 63 +++++++++++++++++++
debian/patches/series | 1 +
5 files changed, 67 insertions(+), 3 deletions(-)
create mode 100644 debian/patches/pve/0004-dhclient-script-allow-ignoring-dns.patch
pve-container:
Filip Schauer (1):
fix #7388: prefer container DNS config over host-managed DHCP
src/PVE/LXC.pm | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
Summary over all repositories:
6 files changed, 84 insertions(+), 9 deletions(-)
--
Generated by murpp 0.12.1
next reply other threads:[~2026-12-01 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 15:33 Filip Schauer [this message]
2026-12-01 15:33 ` [PATCH lxc v3 1/2] patch dhclient-script to allow ignoring DNS settings Filip Schauer
2026-12-01 15:33 ` [PATCH container v3 2/2] fix #7388: prefer container DNS config over host-managed DHCP Filip Schauer
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=20261201153346.163922-1-f.schauer@proxmox.com \
--to=f.schauer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox