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 0DF1E1FF0DA for ; Thu, 19 Nov 2026 20:48:24 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 88D972180C; Thu, 19 Nov 2026 20:48:19 +0100 (CET) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager] ui: sdn: ipam: keep the subnets of different zones apart Date: Thu, 19 Nov 2026 20:46:52 +0100 Message-ID: <20261119194653.675296-1-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795117620363 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.220 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: 5QMKVPWWVAHRLP4FTKWYZNSYKWCRLCHA X-Message-ID-Hash: 5QMKVPWWVAHRLP4FTKWYZNSYKWCRLCHA X-MailFrom: s.hanreich@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 IPAM tree grouped the entries by subnet alone. With the same subnet in different zones, the entries of all these zones, including their gateways, were shown in the subnet of the first zone. Group the entries by zone and subnet, as the IPAM stores them. Signed-off-by: Stefan Hanreich --- www/manager6/tree/DhcpTree.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/www/manager6/tree/DhcpTree.js b/www/manager6/tree/DhcpTree.js index 40eb40bf..20f72d68 100644 --- a/www/manager6/tree/DhcpTree.js +++ b/www/manager6/tree/DhcpTree.js @@ -60,7 +60,9 @@ Ext.define('PVE.sdn.DhcpTree', { zones[element.zone].children.push(vnet); } - if (!(element.subnet in subnets)) { + // subnets of different zones can overlap + let subnetKey = `${element.zone}/${element.subnet}`; + if (!(subnetKey in subnets)) { let subnet = { name: element.subnet, zone: element.zone, @@ -71,14 +73,14 @@ Ext.define('PVE.sdn.DhcpTree', { children: [], }; - subnets[element.subnet] = subnet; + subnets[subnetKey] = subnet; vnets[element.vnet].children.push(subnet); } element.name = element.vmid; // for sorting element.type = 'mapping'; element.iconCls = 'x-tree-icon-none'; - subnets[element.subnet].children.push(element); + subnets[subnetKey].children.push(element); }); me.getView().setRootNode(root); -- 2.47.3