all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH network] api: sdn: show full device name of firewall bridge ports
Date: Mon, 17 Nov 2025 15:01:07 +0100	[thread overview]
Message-ID: <20251117140121.160192-1-g.goller@proxmox.com> (raw)

The bridges endpoint also returns the firewall ports of the bridges.
From the firewall port interface we extract the vmid and the vm network
device index. Instead of just showing a number, return the whole
`net{index}` name. This makes it easier to understand as the vm
configuration also shows `net{index}` as the key of the interfaces.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 src/PVE/API2/Network/SDN/Nodes/Zone.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/API2/Network/SDN/Nodes/Zone.pm b/src/PVE/API2/Network/SDN/Nodes/Zone.pm
index 43acbe9c203f..f86ad1ead271 100644
--- a/src/PVE/API2/Network/SDN/Nodes/Zone.pm
+++ b/src/PVE/API2/Network/SDN/Nodes/Zone.pm
@@ -180,7 +180,7 @@ __PACKAGE__->register_method({
                             index => {
                                 description =>
                                     'The index of the guests network device that this interface belongs to.',
-                                type => 'number',
+                                type => 'string',
                                 optional => 1,
                             },
                             primary_vlan => {
@@ -271,7 +271,7 @@ __PACKAGE__->register_method({
 
                 if ($ifname =~ m/^(?:fwpr(\d+)p(\d+)|veth(\d+)i(\d+)|tap(\d+)i(\d+))$/) {
                     $port->{vmid} = $1;
-                    $port->{index} = $2;
+                    $port->{index} = "net$2";
                 }
 
                 if ($result->{$master}->{vlan_filtering} == 1) {
-- 
2.47.3



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


             reply	other threads:[~2025-11-17 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17 14:01 Gabriel Goller [this message]
2025-11-17 14:04 ` Gabriel Goller
2025-11-17 14:26 ` [pve-devel] applied: " 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=20251117140121.160192-1-g.goller@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pve-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 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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal