[pve-devel] [PATCH pve-common 3/5] INotify: allow vlan tagged bridge interface on non-vlanaware bridge

Alexandre DERUMIER aderumier at odiso.com
Thu Jan 9 06:13:25 CET 2020


>>sounds a bit strange, would be nice to know the background of why this
>>is now OK.. Kernel change? Or change of the default?

To be honest, I don't remember if I have tested tagged vmbr interface without vlan-aware in the past.

I have discover it in the forum, when a user used it on proxmox6.


auto vmbr1
iface vmbr1 inet manual
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0

auto vmbr1.100
iface vmbr1.100 inet manual



ip addr:

40: vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
41: vmbr1.100 at vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 10.59.100.231/24 scope global vmbr1.100


# bridge -c vlan

vmbr1	 1 PVID Egress Untagged


cat ./devices/virtual/net/vmbr1/bridge/vlan_filtering = 0
 

----- Mail original -----
De: "Thomas Lamprecht" <t.lamprecht at proxmox.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>, "Alexandre Derumier" <aderumier at odiso.com>
Envoyé: Mercredi 8 Janvier 2020 18:25:53
Objet: Re: [pve-devel] [PATCH pve-common 3/5] INotify: allow vlan tagged bridge interface on non-vlanaware bridge

On 1/8/20 4:31 AM, Alexandre Derumier wrote: 
> Seem that it's working too with non-vlanaware bridge 
> 

sounds a bit strange, would be nice to know the background of why this 
is now OK.. Kernel change? Or change of the default? 

> Signed-off-by: Alexandre Derumier <aderumier at odiso.com> 
> --- 
> src/PVE/INotify.pm | 4 +--- 
> 1 file changed, 1 insertion(+), 3 deletions(-) 
> 
> diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm 
> index 5c15926..e105ce1 100644 
> --- a/src/PVE/INotify.pm 
> +++ b/src/PVE/INotify.pm 
> @@ -1474,9 +1474,7 @@ sub __write_etc_network_interfaces { 
> die "vlan '$iface' - unable to find parent '$p'\n" 
> if !$n; 
> 
> - if ($n->{type} eq 'bridge' && !$n->{bridge_vlan_aware}) { 
> - die "vlan '$iface' - bridge vlan aware is not enabled on parent '$p'\n"; 
> - } elsif ($n->{type} ne 'eth' && $n->{type} ne 'bridge' && $n->{type} ne 'bond' && $n->{type} ne 'vlan') { 
> + if ($n->{type} ne 'eth' && $n->{type} ne 'bridge' && $n->{type} ne 'bond' && $n->{type} ne 'vlan') { 
> die "vlan '$iface' - wrong interface type on parent '$p' " . 
> "('$n->{type}' != 'eth|bond|bridge|vlan' )\n"; 
> } 
> 

Maybe we could make the check then: 

if ($n->{type} !~ /^(?:eth|bond|bridge|vlan)$/) { 
die ... 
} 

but just a nit-pick.. 



More information about the pve-devel mailing list