net: bridge: mdb: add support for add/del/dump of entries with source
Add new mdb attributes (MDBE_ATTR_SOURCE for setting, MDBA_MDB_EATTR_SOURCE for dumping) to allow add/del and dump of mdb entries with a source address (S,G). New S,G entries are created with filter mode of MCAST_INCLUDE. The same attributes are used for IPv4 and IPv6, they're validated and parsed based on their protocol. S,G host joined entries which are added by user are not allowed yet. Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9c4258c78a
commit
88d4bd1804
@@ -873,6 +873,20 @@ static inline bool br_multicast_querier_exists(struct net_bridge *br,
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool br_multicast_is_star_g(const struct br_ip *ip)
|
||||
{
|
||||
switch (ip->proto) {
|
||||
case htons(ETH_P_IP):
|
||||
return ipv4_is_zeronet(ip->src.ip4);
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
case htons(ETH_P_IPV6):
|
||||
return ipv6_addr_any(&ip->src.ip6);
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int br_multicast_igmp_type(const struct sk_buff *skb)
|
||||
{
|
||||
return BR_INPUT_SKB_CB(skb)->igmp;
|
||||
|
Reference in New Issue
Block a user