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 C0D511FF0C0 for ; Wed, 21 Oct 2026 10:47:45 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A1842214D8; Wed, 21 Oct 2026 10:45:53 +0200 (CEST) From: Hannes Laimer To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v4 17/20] ui: sdn: add zone DHCP backend selector and subnet DHCP options Date: Wed, 21 Oct 2026 10:44:42 +0200 Message-ID: <20261021084445.462195-18-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261021084445.462195-1-h.laimer@proxmox.com> References: <20261021084445.462195-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: 1792572319676 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.360 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: ZHZBKKAJI3VX77MSDTGRP6XLINHQPBEM X-Message-ID-Hash: ZHZBKKAJI3VX77MSDTGRP6XLINHQPBEM 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 a3608428..a1d36eeb 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 66f93de0..7696136d 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 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