public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Jillian Morgan <jillian.morgan@primordial.ca>
Subject: Re: [pve-devel] [PATCH close #545, #5203: Allow bridges to have any valid interface name 2/2]
Date: Wed, 21 Feb 2024 15:14:20 +0100	[thread overview]
Message-ID: <e51efb84-eaae-4b34-abe0-3fa0ca02bd39@proxmox.com> (raw)
In-Reply-To: <20240126171741.2251760-3-jillian.morgan@primordial.ca>



On 1/26/24 18:17, Jillian Morgan wrote:
> 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'}) {

This only works for detecting Linux bridges, we would need to add an
additional check for OVS bridges as well

>  	    if (!$d->{ovs_type}) {
>  		$d->{type} = 'bridge';
>  		if (!defined ($d->{bridge_stp})) {
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 




  reply	other threads:[~2024-02-21 14:14 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 ` [pve-devel] [PATCH close #545, #5203: Allow bridges to have any valid interface name 2/2] Jillian Morgan
2024-02-21 14:14   ` Stefan Hanreich [this message]
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=e51efb84-eaae-4b34-abe0-3fa0ca02bd39@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=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