[Bridge] [net-next v2 02/11] net: bridge: mcast: add wrappers for router node retrieval

2021-05-09 Thread Linus Lüssing
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants and to avoid IPv6 #ifdef clutter later add two wrapper functions for router node retrieval in the payload forwarding code. Signed-off-by: Linus Lüssing --- net/bridge/br_forward.c | 15 +

[Bridge] [net-next v2 03/11] net: bridge: mcast: prepare mdb netlink for mcast router split

2021-05-09 Thread Linus Lüssing
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants and to avoid IPv6 #ifdef clutter later add some inline functions for the protocol specific parts in the mdb router netlink code. Also the we need iterate over the port instead of router list to be able

[Bridge] [net-next v2 04/11] net: bridge: mcast: prepare query reception for mcast router split

2021-05-09 Thread Linus Lüssing
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants and as the br_multicast_mark_router() will be split for that remove the select querier wrapper and instead add ip4 and ip6 variants for br_multicast_query_received(). Signed-off-by: Linus Lüssing ---

[Bridge] [PATCH net-next v2 00/11] net: bridge: split IPv4/v6 mc router state and export for batman-adv

2021-05-09 Thread Linus Lüssing
Hi, The following patches are splitting the so far combined multicast router state in the Linux bridge into two ones, one for IPv4 and one for IPv6, for a more fine-grained detection of multicast routers. This avoids sending IPv4 multicast packets to an IPv6-only multicast router and avoids sendi

[Bridge] [net-next v2 01/11] net: bridge: mcast: rename multicast router lists and timers

2021-05-09 Thread Linus Lüssing
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants, rename the affected variable to the IPv4 version first to avoid some renames in later commits. Signed-off-by: Linus Lüssing --- net/bridge/br_forward.c | 2 +- net/bridge/br_mdb.c | 6 ++-

[Bridge] [net-next v2 05/11] net: bridge: mcast: prepare is-router function for mcast router split

2021-05-09 Thread Linus Lüssing
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants make br_multicast_is_router() protocol family aware. Note that for now br_ip6_multicast_is_router() uses the currently still common ip4_mc_router_timer for now. It will be renamed to ip6_mc_router_tim

[Bridge] [net-next v2 06/11] net: bridge: mcast: prepare expiry functions for mcast router split

2021-05-09 Thread Linus Lüssing
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants move the protocol specific timer access to an ip4 wrapper function. Signed-off-by: Linus Lüssing --- net/bridge/br_multicast.c | 31 ++- 1 file changed, 22 insertions(+),

[Bridge] [net-next v2 07/11] net: bridge: mcast: prepare add-router function for mcast router split

2021-05-09 Thread Linus Lüssing
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants move the protocol specific router list access to an ip4 wrapper function. Signed-off-by: Linus Lüssing --- net/bridge/br_multicast.c | 59 +++ 1 file changed, 41

[Bridge] [net-next v2 08/11] net: bridge: mcast: split router port del+notify for mcast router split

2021-05-09 Thread Linus Lüssing
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants split router port deletion and notification into two functions. When we disable a port for instance later we want to only send one notification to switchdev and netlink for compatibility and want to av

[Bridge] [net-next v2 10/11] net: bridge: mcast: add ip4+ip6 mcast router timers to mdb netlink

2021-05-09 Thread Linus Lüssing
Now that we have split the multicast router state into two, one for IPv4 and one for IPv6, also add individual timers to the mdb netlink router port dump. Leaving the old timer attribute for backwards compatibility. Signed-off-by: Linus Lüssing --- include/uapi/linux/if_bridge.h | 2 ++ net/brid

[Bridge] [net-next v2 11/11] net: bridge: mcast: export multicast router presence adjacent to a port

2021-05-09 Thread Linus Lüssing
To properly support routable multicast addresses in batman-adv in a group-aware way, a batman-adv node needs to know if it serves multicast routers. This adds a function to the bridge to export this so that batman-adv can then make full use of the Multicast Router Discovery capability of the bridg

[Bridge] [net-next v2 09/11] net: bridge: mcast: split multicast router state for IPv4 and IPv6

2021-05-09 Thread Linus Lüssing
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