[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150708.161126.397827455847313183.davem@davemloft.net>
Date: Wed, 08 Jul 2015 16:11:26 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: razor@...ckwall.org
Cc: netdev@...r.kernel.org, bridge@...ts.linux-foundation.org,
stephen@...workplumber.org, vyasevich@...il.com
Subject: Re: [PATCH net] bridge: mdb: zero out the local br_ip variable
before use
From: Nikolay Aleksandrov <razor@...ckwall.org>
Date: Tue, 7 Jul 2015 15:55:56 +0200
> Since commit b0e9a30dd669 ("bridge: Add vlan id to multicast groups")
> there's a check in br_ip_equal() for a matching vlan id, but the mdb
> functions were not modified to use (or at least zero it) so when an
> entry was added it would have a garbage vlan id (from the local br_ip
> variable in __br_mdb_add/del) and this would prevent it from being
> matched and also deleted. So zero out the whole local ip var to protect
> ourselves from future changes and also to fix the current bug, since
> there's no vlan id support in the mdb uapi - use always vlan id 0.
> Example before patch:
> root@...ian:~# bridge mdb add dev br0 port eth1 grp 239.0.0.1 permanent
> root@...ian:~# bridge mdb
> dev br0 port eth1 grp 239.0.0.1 permanent
> root@...ian:~# bridge mdb del dev br0 port eth1 grp 239.0.0.1 permanent
> RTNETLINK answers: Invalid argument
>
> After patch:
> root@...ian:~# bridge mdb add dev br0 port eth1 grp 239.0.0.1 permanent
> root@...ian:~# bridge mdb
> dev br0 port eth1 grp 239.0.0.1 permanent
> root@...ian:~# bridge mdb del dev br0 port eth1 grp 239.0.0.1 permanent
> root@...ian:~# bridge mdb
>
> Signed-off-by: Nikolay Aleksandrov <razor@...ckwall.org>
> Fixes: b0e9a30dd669 ("bridge: Add vlan id to multicast groups")
Applied and queued up for -stable.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists