lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 1 Mar 2019 07:14:38 +0100
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: Do not configure VLAN ID 0

On 01.03.2019 00:49, Florian Fainelli wrote:
> Because we skip the prepare phase, we would not get a chance to have the
> port_vlan_prepare() callback return -EOPNOTSUPP and tell us about that.
> This causes problems with mv88e6xxx which specifically checks for VLAN
> ID = 0. Turns out we do not actually need to program that VLAN ID since
> it should be the default one for switches anyway.
> 
> Reported-by: Heiner Kallweit <hkallweit1@...il.com>
> Fixes: 061f6a505ac3 ("net: dsa: Add ndo_vlan_rx_{add, kill}_vid implementation")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  net/dsa/slave.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 1808a2cd6872..ec54d579645a 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -996,6 +996,9 @@ static int dsa_slave_vlan_rx_add_vid(struct net_device *dev, __be16 proto,
>  	struct bridge_vlan_info info;
>  	int ret;
>  
> +	if (vid == 0)
> +		return 0;
> +
>  	/* Check for a possible bridge VLAN entry now since there is no
>  	 * need to emulate the switchdev prepare + commit phase.
>  	 */
> @@ -1029,6 +1032,9 @@ static int dsa_slave_vlan_rx_kill_vid(struct net_device *dev, __be16 proto,
>  	struct bridge_vlan_info info;
>  	int ret;
>  
> +	if (vid == 0)
> +		return 0;
> +
>  	/* Check for a possible bridge VLAN entry now since there is no
>  	 * need to emulate the switchdev prepare + commit phase.
>  	 */
> 
Tested-by: Heiner Kallweit <hkallweit1@...il.com>

The error has gone. New with the original patch is just the following
message in syslog when bringing the device up. I'm not sure there is
benefit in it (at least for VLAN 0 because it's a no-op).

8021q: adding VLAN 0 to HW filter on device eth_cu_1000_2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ