diff options
author | Cong Wang <amwang@redhat.com> | 2012-12-11 17:23:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-12 13:02:30 -0500 |
commit | 37a393bc4932d7bac360f40064aaafc01ab44901 (patch) | |
tree | 61a0a7cd1ab9db418558dbc44d4455868b7220cb /net/bridge/br_multicast.c | |
parent | fd0ea7dbfae16015e72c4bbc6b1b43fffc3b914f (diff) |
bridge: notify mdb changes via netlink
As Stephen mentioned, we need to monitor the mdb
changes in user-space, so add notifications via netlink too.
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Cong Wang <amwang@redhat.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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 847b98a1d5e0..d929586ce39e 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -681,6 +681,7 @@ static int br_multicast_add_group(struct net_bridge *br, | |||
681 | (unsigned long)p); | 681 | (unsigned long)p); |
682 | 682 | ||
683 | rcu_assign_pointer(*pp, p); | 683 | rcu_assign_pointer(*pp, p); |
684 | br_mdb_notify(br->dev, port, group, RTM_NEWMDB); | ||
684 | 685 | ||
685 | found: | 686 | found: |
686 | mod_timer(&p->timer, now + br->multicast_membership_interval); | 687 | mod_timer(&p->timer, now + br->multicast_membership_interval); |
@@ -1240,6 +1241,7 @@ static void br_multicast_leave_group(struct net_bridge *br, | |||
1240 | hlist_del_init(&p->mglist); | 1241 | hlist_del_init(&p->mglist); |
1241 | del_timer(&p->timer); | 1242 | del_timer(&p->timer); |
1242 | call_rcu_bh(&p->rcu, br_multicast_free_pg); | 1243 | call_rcu_bh(&p->rcu, br_multicast_free_pg); |
1244 | br_mdb_notify(br->dev, port, group, RTM_DELMDB); | ||
1243 | 1245 | ||
1244 | if (!mp->ports && !mp->mglist && | 1246 | if (!mp->ports && !mp->mglist && |
1245 | netif_running(br->dev)) | 1247 | netif_running(br->dev)) |