bridge: multicast: enable snooping on general queries only
authorLinus Lüssing <linus.luessing@web.de>
Mon, 10 Mar 2014 21:25:25 +0000 (22:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Mar 2014 03:22:10 +0000 (23:22 -0400)
commit20a599bec95a52fa72432b2376a2ce47c5bb68fb
tree37e01659d8e8974706ecc4042fff98bba274a59a
parent9ed973cc40c588abeaa58aea0683ea665132d11d
bridge: multicast: enable snooping on general queries only

Without this check someone could easily create a denial of service
by injecting multicast-specific queries to enable the bridge
snooping part if no real querier issuing periodic general queries
is present on the link which would result in the bridge wrongly
shutting down ports for multicast traffic as the bridge did not learn
about these listeners.

With this patch the snooping code is enabled upon receiving valid,
general queries only.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_multicast.c