diff options
author | Andrew Lunn <andrew@lunn.ch> | 2017-11-09 23:10:58 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-10 13:41:40 +0900 |
commit | 2a26028d119267a2386733dd71d256f269e70f52 (patch) | |
tree | 6775f047aca49015026ef90c1f2061e5ac5f4b3c /net/bridge/br_multicast.c | |
parent | ff0fd34eaee9978f9ed7f6e2ac47f9590d4afac3 (diff) | |
download | blackbird-op-linux-2a26028d119267a2386733dd71d256f269e70f52.tar.gz blackbird-op-linux-2a26028d119267a2386733dd71d256f269e70f52.zip |
net: bridge: Send notification when host join/leaves a group
The host can join or leave a multicast group on the brX interface, as
indicated by IGMP snooping. This is tracked within the bridge
multicast code. Send a notification when this happens, in the same way
a notification is sent when a port of the bridge joins/leaves a group
because of IGMP snooping.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_multicast.c')
-rw-r--r-- | net/bridge/br_multicast.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index bfe5adb1f51c..cb4729539b82 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -250,6 +250,7 @@ static void br_multicast_group_expired(struct timer_list *t) goto out; mp->host_joined = false; + br_mdb_notify(br->dev, NULL, &mp->addr, RTM_DELMDB, 0); if (mp->ports) goto out; @@ -773,7 +774,10 @@ static int br_multicast_add_group(struct net_bridge *br, goto err; if (!port) { - mp->host_joined = true; + if (!mp->host_joined) { + mp->host_joined = true; + br_mdb_notify(br->dev, NULL, &mp->addr, RTM_NEWMDB, 0); + } mod_timer(&mp->timer, now + br->multicast_membership_interval); goto out; } |