From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id BA1171FF09F for ; Tue, 01 Dec 2026 16:33:58 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 16D0B2153A; Tue, 01 Dec 2026 16:33:56 +0100 (CET) From: Filip Schauer 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 Message-ID: <20261201153346.163922-1-f.schauer@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1796139230624 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.155 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: XP76BLDQEKGVLXKND6BSY7TLOVDOY3GF X-Message-ID-Hash: XP76BLDQEKGVLXKND6BSY7TLOVDOY3GF X-MailFrom: f.schauer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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