History

net: bridge: mcast: add support for raw L2 multicast groups

Extend the bridge multicast control and data path to configure routes for L2 (non-IP) multicast groups. The uapi struct br_mdb_entry union u is extended with another variant, mac_addr, which does not change the structure size, and which is valid when the proto field is zero. To be compatible with the forwarding code that is already in place, which acts as an IGMP/MLD snooping bridge with querier capabilities, we need to declare that for L2 MDB entries (for which there exists no such thing as IGMP/MLD snooping/querying), that there is always a querier. Otherwise, these entries would be flooded to all bridge ports and not just to those that are members of the L2 multicast group. Needless to say, only permanent L2 multicast groups can be installed on a bridge port.

Nikolay Aleksandrov committed 6 years ago

Commit 955062b1 parent 8ece8537 files · +43 −10Browse files

Showing the changes to include/uapi/linux (1 of 7 files). Show all

Unified · Split

include/uapi/linux/if_bridge.h+1−0
@@ -651,6 +651,7 @@ struct br_mdb_entry { · 650 unmodified lines
651651 union {
652652 __be32 ip4;
653653 struct in6_addr ip6;
654+ unsigned char mac_addr[ETH_ALEN];
654655 } u;
655656 __be16 proto;
656657 } addr;