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 9C03C1FF0A7 for ; Wed, 02 Sep 2026 14:49:15 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4B564214EF; Wed, 02 Sep 2026 14:48:34 +0200 (CEST) From: Hannes Laimer To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager 12/12] ui: sdn: dhcp backend selector on all zones, expose dhcp options Date: Wed, 2 Sep 2026 14:47:39 +0200 Message-ID: <20260902124739.750853-13-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260902124739.750853-1-h.laimer@proxmox.com> References: <20260902124739.750853-1-h.laimer@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788353269569 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.652 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: O5Q3Y5IHCDED33G6G5QYMOR5THLUUUJA X-Message-ID-Hash: O5Q3Y5IHCDED33G6G5QYMOR5THLUUUJA X-MailFrom: h.laimer@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: The zone dhcp property is now common to all zone types with two backends, so the simple-zone automatic-DHCP checkbox hardcoding dnsmasq becomes a selector on the common zone panel, offering dnsmasq only where the backend is supported. The subnet gains fields for the dns-server option, which so far was settable through the API only and is the only way guests get a resolver with the ebpf backend, and for the new lease-time knob, which bounds how long an edited mapping takes to reach a leased guest. Signed-off-by: Hannes Laimer --- www/manager6/sdn/SubnetEdit.js | 24 ++++++++++++++++++++++++ www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++ www/manager6/sdn/zones/SimpleEdit.js | 11 ----------- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/www/manager6/sdn/SubnetEdit.js b/www/manager6/sdn/SubnetEdit.js index a3608428..f98f65af 100644 --- a/www/manager6/sdn/SubnetEdit.js +++ b/www/manager6/sdn/SubnetEdit.js @@ -56,6 +56,30 @@ Ext.define('PVE.sdn.SubnetInputPanel', { deleteEmpty: '{!isCreate}', }, }, + { + xtype: 'proxmoxtextfield', + name: 'dhcp-dns-server', + vtype: 'IP64Address', + fieldLabel: gettext('DHCP DNS Server'), + allowBlank: true, + skipEmptyText: true, + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, + { + xtype: 'proxmoxintegerfield', + // TRANSLATORS: 's' is the SI abbreviation for seconds, the unit of the value + fieldLabel: gettext('DHCP Lease Time') + ' (s)', + emptyText: gettext('default'), + name: 'dhcp-lease-time', + minValue: 60, + allowBlank: true, + skipEmptyText: true, + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, ], }); diff --git a/www/manager6/sdn/zones/Base.js b/www/manager6/sdn/zones/Base.js index 66f93de0..3039b99f 100644 --- a/www/manager6/sdn/zones/Base.js +++ b/www/manager6/sdn/zones/Base.js @@ -82,6 +82,23 @@ Ext.define('PVE.panel.SDNZoneBase', { }, ); + let dhcpBackends = [ + ['__default__', Proxmox.Utils.NoneText], + ['ebpf', 'eBPF'], + ]; + if (me.type === 'simple') { + dhcpBackends.splice(1, 0, ['dnsmasq', 'dnsmasq']); + } + + me.advancedItems.push({ + xtype: 'proxmoxKVComboBox', + name: 'dhcp', + fieldLabel: gettext('Automatic DHCP'), + comboItems: dhcpBackends, + value: '__default__', + deleteEmpty: !me.isCreate, + }); + me.callParent(); }, }); diff --git a/www/manager6/sdn/zones/SimpleEdit.js b/www/manager6/sdn/zones/SimpleEdit.js index ba10bb36..aeb076ae 100644 --- a/www/manager6/sdn/zones/SimpleEdit.js +++ b/www/manager6/sdn/zones/SimpleEdit.js @@ -19,17 +19,6 @@ Ext.define('PVE.sdn.zones.SimpleInputPanel', { var me = this; me.items = []; - me.advancedItems = [ - { - xtype: 'proxmoxcheckbox', - name: 'dhcp', - inputValue: 'dnsmasq', - uncheckedValue: null, - checked: false, - fieldLabel: gettext('Automatic DHCP'), - deleteEmpty: !me.isCreate, - }, - ]; me.callParent(); }, -- 2.47.3