public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] ui: zone status: fix primary key generation for ip-vrf table
Date: Wed,  3 Dec 2025 11:25:39 +0100	[thread overview]
Message-ID: <20251203102541.108774-1-s.hanreich@proxmox.com> (raw)

The same IP / CIDR can have multiple entries in the IP-VRF with
differing metrics. To avoid issues when generating primary keys for
the datatable, consider the metric for generating the primary key as
well.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 ui/src/sdn/evpn/zone_status.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/sdn/evpn/zone_status.rs b/ui/src/sdn/evpn/zone_status.rs
index f1687155..7f966d2e 100644
--- a/ui/src/sdn/evpn/zone_status.rs
+++ b/ui/src/sdn/evpn/zone_status.rs
@@ -56,7 +56,7 @@ impl From<SdnZoneIpVrf> for IpVrfEntry {
 
 impl ExtractPrimaryKey for IpVrfEntry {
     fn extract_key(&self) -> Key {
-        Key::from(self.0.ip.as_str())
+        Key::from(format!("{}/{}", self.0.ip, self.0.metric))
     }
 }
 
-- 
2.47.3


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


             reply	other threads:[~2025-12-03 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 10:25 Stefan Hanreich [this message]
2025-12-03 14:04 ` Thomas Lamprecht

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=20251203102541.108774-1-s.hanreich@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=pdm-devel@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal