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 C70751FF0DF for ; Thu, 05 Nov 2026 11:06:07 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 823F621652; Thu, 05 Nov 2026 11:05:05 +0100 (CET) From: Hannes Laimer To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v6 13/17] ui: sdn: add zone DHCP backend selector and subnet DHCP options Date: Thu, 5 Nov 2026 11:03:12 +0100 Message-ID: <20261105100316.449163-14-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261105100316.449163-1-h.laimer@proxmox.com> References: <20261105100316.449163-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: 1793873081743 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.288 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: O7QDHLPKAQVMNQK5O6CZEWEGXLDSLZ63 X-Message-ID-Hash: O7QDHLPKAQVMNQK5O6CZEWEGXLDSLZ63 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: Zones of every type can now get DHCP from the eBPF backend, while dnsmasq stays limited to simple zones. The checkbox that enabled dnsmasq on simple zones becomes a backend selector in the advanced options of every zone dialog. The subnet dialog gains fields for the new DHCP lease time and for the DHCP DNS server, which could be set only through the API until now. The eBPF backend hands out a DNS server only when the subnet sets one. Signed-off-by: Hannes Laimer Reviewed-by: Stefan Hanreich Tested-by: Stefan Hanreich --- www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++ www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++ www/manager6/sdn/zones/SimpleEdit.js | 11 ----------- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/www/manager6/sdn/SubnetEdit.js b/www/manager6/sdn/SubnetEdit.js index a360842891a3..a1d36eeb07d1 100644 --- a/www/manager6/sdn/SubnetEdit.js +++ b/www/manager6/sdn/SubnetEdit.js @@ -56,6 +56,29 @@ 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', + name: 'dhcp-lease-time', + fieldLabel: gettext('DHCP Lease Time') + ' (s)', + emptyText: Proxmox.Utils.defaultText, + minValue: 60, + maxValue: 4294967295, + allowBlank: true, + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, ], }); diff --git a/www/manager6/sdn/zones/Base.js b/www/manager6/sdn/zones/Base.js index 66f93de0dff2..7696136d1ec0 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('DHCP Backend'), + 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 ba10bb3616ea..aeb076aeec85 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