[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191116.122500.1947417671610186623.davem@davemloft.net>
Date: Sat, 16 Nov 2019 12:25:00 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: olteanv@...il.com
Cc: f.fainelli@...il.com, vivien.didelot@...il.com, andrew@...n.ch,
netdev@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: tag_8021q: Fix dsa_8021q_restore_pvid
for an absent pvid
From: Vladimir Oltean <olteanv@...il.com>
Date: Sat, 16 Nov 2019 18:08:25 +0200
> This sequence of operations:
> ip link set dev br0 type bridge vlan_filtering 1
> bridge vlan del dev swp2 vid 1
> ip link set dev br0 type bridge vlan_filtering 1
> ip link set dev br0 type bridge vlan_filtering 0
>
> apparently fails with the message:
...
> The reason is the implementation of br_get_pvid:
>
> static inline u16 br_get_pvid(const struct net_bridge_vlan_group *vg)
> {
> if (!vg)
> return 0;
>
> smp_rmb();
> return vg->pvid;
> }
>
> Since VID 0 is an invalid pvid from the bridge's point of view, let's
> add this check in dsa_8021q_restore_pvid to avoid restoring a pvid that
> doesn't really exist.
>
> Fixes: 5f33183b7fdf ("net: dsa: tag_8021q: Restore bridge VLANs when enabling vlan_filtering")
> Signed-off-by: Vladimir Oltean <olteanv@...il.com>
Applied, thanks.
Powered by blists - more mailing lists