From: "Hannes Dürr" <h.duerr@proxmox.com>
To: Stefan Hanreich <s.hanreich@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH pve-manager] sdn: ipam: fix ipam grouping identical subnets in different vnets
Date: Tue, 28 Nov 2023 10:02:19 +0100 [thread overview]
Message-ID: <0e5bc165-1050-4303-8fe8-75e761a98e62@proxmox.com> (raw)
In-Reply-To: <20231128085851.61788-1-s.hanreich@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
On 11/28/23 09:58, Stefan Hanreich wrote:
> When SDN is configured with the same subnet in two different VNets the
> IPAM tree would render them wrongly.
>
> Reported-By: Hannes Duerr <h.duerr@proxmox.com>
> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
> ---
> www/manager6/tree/DhcpTree.js | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/www/manager6/tree/DhcpTree.js b/www/manager6/tree/DhcpTree.js
> index d0b80803d..60029d3f4 100644
> --- a/www/manager6/tree/DhcpTree.js
> +++ b/www/manager6/tree/DhcpTree.js
> @@ -60,7 +60,11 @@ Ext.define('PVE.sdn.DhcpTree', {
> zones[element.zone].children.push(vnet);
> }
>
> - if (!(element.subnet in subnets)) {
> + if (!(element.vnet in subnets)) {
> + subnets[element.vnet] = {};
> + }
> +
> + if (!(element.subnet in subnets[element.vnet])) {
> let subnet = {
> name: element.subnet,
> zone: element.zone,
> @@ -71,13 +75,13 @@ Ext.define('PVE.sdn.DhcpTree', {
> children: [],
> };
>
> - subnets[element.subnet] = subnet;
> + subnets[element.vnet][element.subnet] = subnet;
> vnets[element.vnet].children.push(subnet);
> }
>
> element.type = 'mapping';
> element.iconCls = 'x-tree-icon-none';
> - subnets[element.subnet].children.push(element);
> + subnets[element.vnet][element.subnet].children.push(element);
> });
>
> me.getView().setRootNode(root);
prev parent reply other threads:[~2023-11-28 9:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 8:58 Stefan Hanreich
2023-11-28 9:02 ` Hannes Dürr [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0e5bc165-1050-4303-8fe8-75e761a98e62@proxmox.com \
--to=h.duerr@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.hanreich@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.