From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id DC4E0911D3 for ; Fri, 26 Jan 2024 18:18:38 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BBAB738ED4 for ; Fri, 26 Jan 2024 18:18:08 +0100 (CET) Received: from mail-qv1-xf66.google.com (mail-qv1-xf66.google.com [IPv6:2607:f8b0:4864:20::f66]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 26 Jan 2024 18:18:07 +0100 (CET) Received: by mail-qv1-xf66.google.com with SMTP id 6a1803df08f44-6818f3cf00aso5094186d6.0 for ; Fri, 26 Jan 2024 09:18:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=primordial.ca; s=google; t=1706289480; x=1706894280; darn=lists.proxmox.com; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M7vQR3WD0sCWrmHVBDnFfmGHSdct2b9IYDC1HsnI+K0=; b=TUETYi7CDWCrUIUEvFVxoHkKgV4sTNEI87Ps9L1AxRH+wjcQslQ3eaCzeBVnT8h7ON rcFI1kfpq5ADpIJAaLvU3LgkJAvOzlINSURp/SzswNXN7BeLYldIn8IpDJh5b8+01ZXy eMIxECDbnbzHj+aowZnL6CwjgU/AQ+l/1XDcA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289480; x=1706894280; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M7vQR3WD0sCWrmHVBDnFfmGHSdct2b9IYDC1HsnI+K0=; b=pRHHtiCTa265ku57OrstvUFstav7rQsv/F7b6IQjAOy/+nhaO62uTqCOZrAGenM9lO eIt9LnVnVJ9NOt8/iM3IEGXV8zgDjI1j2WFgv9XH/dGjDDcn03TyC73YJl+k4+wcJj1d Vd64eRphSQNzx6/UoewsaGvjjJ2qa84bjB1cqSBYMLFmlFcOcazSZ8Dygl/TAtv0quwE lxV5jWnjhRT/v2gtYXxKpfU7k7bStclCd2dofnKYRpRjgAP+8EIwc0LyavTVfLZSmtVy rex6HnBW56Pr2IiP4Q1tJQJZMa835NerEHlZLEExnFG05NG8rGcEyQV/LMAP6K6qh5Gp VGnA== X-Gm-Message-State: AOJu0YxV6G/4cjQcETLi03JBHnQ36QRqHWpnAjDHYQu10dQmTo8zai8E tlXDvUlfapoMEF2No5tjDZL1+FlCPm+4ACHzXe9EvlDNIW62x/A8afPVFSIBR4VZuAclkMcUiqE 9KNlYLGoAqE7za1HOord6FiNxzDvNQx71Q4yC7N5WOLGHc5Lb X-Google-Smtp-Source: AGHT+IFqbIT/jTXAAv8Ng66XndYhA9NwJEHY0NVPTrg5pYhtgehmnmwBswf8CCqJZpJzv3GAF+2TYZNwgkcT X-Received: by 2002:a05:6214:19e4:b0:686:ac3a:e02f with SMTP id q4-20020a05621419e400b00686ac3ae02fmr269913qvc.22.1706289480562; Fri, 26 Jan 2024 09:18:00 -0800 (PST) Received: from prime.int.primordial.ca (tunnel228220-pt.tunnel.tserv21.tor1.ipv6.he.net. [2001:470:1c:aaf::2]) by smtp-relay.gmail.com with ESMTPS id jq8-20020ad45fc8000000b00685140306aesm47187qvb.60.2024.01.26.09.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:18:00 -0800 (PST) X-Relaying-Domain: primordial.ca Received: from dark.int.primordial.ca (dark.int.primordial.ca [192.168.1.7]) by prime.int.primordial.ca (8.17.2/8.17.1) with ESMTP id 40QHHuME715190; Fri, 26 Jan 2024 12:17:59 -0500 From: Jillian Morgan To: pve-devel@lists.proxmox.com Date: Fri, 26 Jan 2024 12:17:30 -0500 Message-ID: <20240126171741.2251760-3-jillian.morgan@primordial.ca> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240126171741.2251760-1-jillian.morgan@primordial.ca> References: <20240126171741.2251760-1-jillian.morgan@primordial.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_MISSING 0.1 Missing DMARC policy RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - X-Mailman-Approved-At: Mon, 29 Jan 2024 12:38:14 +0100 Subject: [pve-devel] [PATCH close #545, #5203: Allow bridges to have any valid interface name 2/2] X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2024 17:18:38 -0000 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 --- 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})) {