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 C7B6472F0A for ; Wed, 14 Apr 2021 13:26:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B4260D6EE for ; Wed, 14 Apr 2021 13:26:08 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS id E73DCD6E4 for ; Wed, 14 Apr 2021 13:26:07 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id AAB0C45A78 for ; Wed, 14 Apr 2021 13:26:07 +0200 (CEST) Date: Wed, 14 Apr 2021 13:26:00 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20210414095313.96550-1-d.jaeger@proxmox.com> In-Reply-To: <20210414095313.96550-1-d.jaeger@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1618399452.5mhj1lbvvn.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.026 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, inotify.pm] Subject: Re: [pve-devel] [PATCH common] Fix #2711: inotify: Allow 'v' as VLAN separator 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: Wed, 14 Apr 2021 11:26:38 -0000 On April 14, 2021 11:53 am, Dominic J=C3=A4ger wrote: > VLANs with a name like vmbr0v5 had type UNKNOWN unless vlan-raw-device wa= s set. > This way we return type VLAN for them as we do for vmbr0.5 as indicated in the corresponding bug - vmbr0v5 is not a VLAN device,=20 but a bridge with a VLAN device as port. this patch is thus going in the=20 wrong direction ;) >=20 > Signed-off-by: Dominic J=C3=A4ger > --- > src/PVE/INotify.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm > index 2bb87bb..adcc91a 100644 > --- a/src/PVE/INotify.pm > +++ b/src/PVE/INotify.pm > @@ -27,6 +27,8 @@ use base 'Exporter'; > =20 > our @EXPORT_OK =3D qw(read_file write_file register_file); > =20 > +my $VLAN_RE =3D qr!^(\S+)[v\.](\d+)$!; > + > my $ccache; > my $ccachemap; > my $ccacheregex; > @@ -1077,7 +1079,7 @@ sub __read_etc_network_interfaces { > $ifaces->{$1}->{exists} =3D 0; > $d->{exists} =3D 0; > } > - } elsif ($iface =3D~ m/^(\S+)\.\d+$/ || $d->{'vlan-raw-device'}) { > + } elsif ($iface =3D~ $VLAN_RE || $d->{'vlan-raw-device'}) { > $d->{type} =3D 'vlan'; > =20 > my $raw_iface =3D $d->{'vlan-raw-device'} ? $d->{'vlan-raw-device'}= : $1; > @@ -1550,7 +1552,7 @@ sub __write_etc_network_interfaces { > my $p =3D undef; > my $vlanid =3D undef; > =20 > - if ($iface =3D~ m/^(\S+)\.(\d+)$/) { > + if ($iface =3D~ $VLAN_RE) { > $p =3D $1; > $vlanid =3D $2; > delete $d->{'vlan-raw-device'} if $d->{'vlan-raw-device'}; > --=20 > 2.20.1 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20 =