net: bridge: mcast: split multicast router state for IPv4 and IPv6
authorLinus Lüssing <linus.luessing@c0d3.blue>
Thu, 13 May 2021 13:20:51 +0000 (15:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 May 2021 21:04:31 +0000 (14:04 -0700)
commita3c02e769efe66dce5e2c716862b60c8d44d191e
tree1d3027e91f885618aea5c135c7e0cdb4e94bfc62
parented2d35971a8066aa24ce65dd66c113c0506bb206
net: bridge: mcast: split multicast router state for IPv4 and IPv6

A multicast router for IPv4 does not imply that the same host also is a
multicast router for IPv6 and vice versa.

To reduce multicast traffic when a host is only a multicast router for
one of these two protocol families, keep router state for IPv4 and IPv6
separately. Similar to how querier state is kept separately.

For backwards compatibility for netlink and switchdev notifications
these two will still only notify if a port switched from either no
IPv4/IPv6 multicast router to any IPv4/IPv6 multicast router or the
other way round. However a full netlink MDB router dump will now also
include a multicast router timeout for both IPv4 and IPv6.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_mdb.c
net/bridge/br_multicast.c
net/bridge/br_private.h