From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 284AC1FF066 for ; Tue, 24 Nov 2026 10:26:20 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4DFFD21621; Tue, 24 Nov 2026 10:26:18 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com, Gabriel Goller Subject: Re: [PATCH network] sdn: dhcp: do not start dnsmasq for zones without a vnet with subnets Date: Tue, 24 Nov 2026 10:22:26 +0100 Message-ID: <179551200864.3536408.9967704513250177936.b4-ty@b4> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261123-sdn_dhcp_do-v1-1-4b55711e9620@proxmox.com> References: <20261123-sdn_dhcp_do-v1-1-4b55711e9620@proxmox.com> 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: 1795512374924 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.149 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: JM3HGGWX4LTIY2QTLB4FCCKF46W3QKP4 X-Message-ID-Hash: JM3HGGWX4LTIY2QTLB4FCCKF46W3QKP4 X-MailFrom: t.lamprecht@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: On Mon, 23 Nov 2026 17:48:03 +0100, Gabriel Goller wrote: > A zone with DHCP enabled but no vnet with a subnet still got a dnsmasq > instance. The interface= line for a vnet is only written once the vnet > has a subnet, so the instance config only has except-interface=lo. With > bind-dynamic, dnsmasq then binds port 53 on every address of the host, > including the vnets of other zones. Zones are configured in sorted > order, so every DHCP zone after the empty one then fails to start: > > [...] Applied, thanks! This caused a new case for guest start or vNIC hot-plug a vnet of a zone that no longer gets a dnsmasq instance, as adding the IP mapping tried to reload the stopped dnsmasq instance. So I applied a commit before yours that only reloads dnsmasq and updates the lease if the instance is actually enabled, and still writes the ethers entry otherwise. Please double check that this fits how you want the DHCP code to work. Also added a follow-up that configures dnsmasq with the applied subnets instead of the pending ones. FWIW, before_configure still writes the defaults, the D-Bus policy and the VRF drop-in for the zones that are skipped now, but shouldn't really hurt either, so I left it for now. [1/1] sdn: dhcp: do not start dnsmasq for zones without a vnet with subnets commit: 9274b07d1f5f75c5008b25a90183782c8c8fa769