public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Jillian Morgan <jillian.morgan@primordial.ca>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH close #545, #5203: Allow bridges to have any valid interface name 2/2]
Date: Fri, 26 Jan 2024 12:17:30 -0500	[thread overview]
Message-ID: <20240126171741.2251760-3-jillian.morgan@primordial.ca> (raw)
In-Reply-To: <20240126171741.2251760-1-jillian.morgan@primordial.ca>

Detect bridge interface by bridge_ports attribute
Repo: pve-common

Similar to other interface types, we can detect a bridge by the presense of
it's bridge_ports attribute rather than solely relying on the "vmbr" ifname
prefix heuristic.

Signed-off-by: Jillian Morgan <jillian.morgan@primordial.ca>
---
 pve-common/src/PVE/INotify.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index 6432295..9b45346 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -1053,7 +1053,7 @@ sub __read_etc_network_interfaces {
 		my $tag = &$extract_ovs_option($d, 'tag');
 		$d->{ovs_tag} = $tag if defined($tag);
 	    }
-	} elsif ($iface =~ m/^vmbr\d+$/) {
+	} elsif ($iface =~ m/^vmbr\d+$/ || $d->{'bridge_ports'}) {
 	    if (!$d->{ovs_type}) {
 		$d->{type} = 'bridge';
 		if (!defined ($d->{bridge_stp})) {



  parent reply	other threads:[~2024-01-26 17:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 17:17 [pve-devel] [PATCH close #545, #5203: Allow bridges to have any valid interface name 0/2] Jillian Morgan
2024-01-26 17:17 ` [pve-devel] [PATCH close #545, #5203: Allow bridges to have any valid interface name 1/2] Jillian Morgan
2024-02-21 14:13   ` Stefan Hanreich
2024-01-26 17:17 ` Jillian Morgan [this message]
2024-02-21 14:14   ` [pve-devel] [PATCH close #545, #5203: Allow bridges to have any valid interface name 2/2] Stefan Hanreich
2024-02-21 14:23   ` Stefan Hanreich
2024-02-21 14:21 ` [pve-devel] [PATCH close #545, #5203: Allow bridges to have any valid interface name 0/2] Stefan Hanreich
     [not found]   ` <df4fcfca9d62156ff3ea1a8826527a75d2603594.camel@groupe-cyllene.com>
2024-02-22  8:11     ` 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=20240126171741.2251760-3-jillian.morgan@primordial.ca \
    --to=jillian.morgan@primordial.ca \
    --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 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