Commit ff0fd34e authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: bridge: Rename mglist to host_joined

The boolean mglist indicates the host has joined a particular
multicast group on the bridge interface. It is badly named, obscuring
what is means. Rename it.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Acked-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4dc6758d
...@@ -137,7 +137,7 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb ...@@ -137,7 +137,7 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
mdst = br_mdb_get(br, skb, vid); mdst = br_mdb_get(br, skb, vid);
if ((mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) && if ((mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) &&
br_multicast_querier_exists(br, eth_hdr(skb))) { br_multicast_querier_exists(br, eth_hdr(skb))) {
if ((mdst && mdst->mglist) || if ((mdst && mdst->host_joined) ||
br_multicast_is_router(br)) { br_multicast_is_router(br)) {
local_rcv = true; local_rcv = true;
br->dev->stats.multicast++; br->dev->stats.multicast++;
......
...@@ -655,7 +655,7 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry) ...@@ -655,7 +655,7 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry)
call_rcu_bh(&p->rcu, br_multicast_free_pg); call_rcu_bh(&p->rcu, br_multicast_free_pg);
err = 0; err = 0;
if (!mp->ports && !mp->mglist && if (!mp->ports && !mp->host_joined &&
netif_running(br->dev)) netif_running(br->dev))
mod_timer(&mp->timer, jiffies); mod_timer(&mp->timer, jiffies);
break; break;
......
...@@ -249,7 +249,7 @@ static void br_multicast_group_expired(struct timer_list *t) ...@@ -249,7 +249,7 @@ static void br_multicast_group_expired(struct timer_list *t)
if (!netif_running(br->dev) || timer_pending(&mp->timer)) if (!netif_running(br->dev) || timer_pending(&mp->timer))
goto out; goto out;
mp->mglist = false; mp->host_joined = false;
if (mp->ports) if (mp->ports)
goto out; goto out;
...@@ -292,7 +292,7 @@ static void br_multicast_del_pg(struct net_bridge *br, ...@@ -292,7 +292,7 @@ static void br_multicast_del_pg(struct net_bridge *br,
p->flags); p->flags);
call_rcu_bh(&p->rcu, br_multicast_free_pg); call_rcu_bh(&p->rcu, br_multicast_free_pg);
if (!mp->ports && !mp->mglist && if (!mp->ports && !mp->host_joined &&
netif_running(br->dev)) netif_running(br->dev))
mod_timer(&mp->timer, jiffies); mod_timer(&mp->timer, jiffies);
...@@ -773,7 +773,7 @@ static int br_multicast_add_group(struct net_bridge *br, ...@@ -773,7 +773,7 @@ static int br_multicast_add_group(struct net_bridge *br,
goto err; goto err;
if (!port) { if (!port) {
mp->mglist = true; mp->host_joined = true;
mod_timer(&mp->timer, now + br->multicast_membership_interval); mod_timer(&mp->timer, now + br->multicast_membership_interval);
goto out; goto out;
} }
...@@ -1477,7 +1477,7 @@ static int br_ip4_multicast_query(struct net_bridge *br, ...@@ -1477,7 +1477,7 @@ static int br_ip4_multicast_query(struct net_bridge *br,
max_delay *= br->multicast_last_member_count; max_delay *= br->multicast_last_member_count;
if (mp->mglist && if (mp->host_joined &&
(timer_pending(&mp->timer) ? (timer_pending(&mp->timer) ?
time_after(mp->timer.expires, now + max_delay) : time_after(mp->timer.expires, now + max_delay) :
try_to_del_timer_sync(&mp->timer) >= 0)) try_to_del_timer_sync(&mp->timer) >= 0))
...@@ -1561,7 +1561,7 @@ static int br_ip6_multicast_query(struct net_bridge *br, ...@@ -1561,7 +1561,7 @@ static int br_ip6_multicast_query(struct net_bridge *br,
goto out; goto out;
max_delay *= br->multicast_last_member_count; max_delay *= br->multicast_last_member_count;
if (mp->mglist && if (mp->host_joined &&
(timer_pending(&mp->timer) ? (timer_pending(&mp->timer) ?
time_after(mp->timer.expires, now + max_delay) : time_after(mp->timer.expires, now + max_delay) :
try_to_del_timer_sync(&mp->timer) >= 0)) try_to_del_timer_sync(&mp->timer) >= 0))
...@@ -1622,7 +1622,7 @@ br_multicast_leave_group(struct net_bridge *br, ...@@ -1622,7 +1622,7 @@ br_multicast_leave_group(struct net_bridge *br,
br_mdb_notify(br->dev, port, group, RTM_DELMDB, br_mdb_notify(br->dev, port, group, RTM_DELMDB,
p->flags); p->flags);
if (!mp->ports && !mp->mglist && if (!mp->ports && !mp->host_joined &&
netif_running(br->dev)) netif_running(br->dev))
mod_timer(&mp->timer, jiffies); mod_timer(&mp->timer, jiffies);
} }
...@@ -1662,7 +1662,7 @@ br_multicast_leave_group(struct net_bridge *br, ...@@ -1662,7 +1662,7 @@ br_multicast_leave_group(struct net_bridge *br,
br->multicast_last_member_interval; br->multicast_last_member_interval;
if (!port) { if (!port) {
if (mp->mglist && if (mp->host_joined &&
(timer_pending(&mp->timer) ? (timer_pending(&mp->timer) ?
time_after(mp->timer.expires, time) : time_after(mp->timer.expires, time) :
try_to_del_timer_sync(&mp->timer) >= 0)) { try_to_del_timer_sync(&mp->timer) >= 0)) {
......
...@@ -209,7 +209,7 @@ struct net_bridge_mdb_entry ...@@ -209,7 +209,7 @@ struct net_bridge_mdb_entry
struct rcu_head rcu; struct rcu_head rcu;
struct timer_list timer; struct timer_list timer;
struct br_ip addr; struct br_ip addr;
bool mglist; bool host_joined;
}; };
struct net_bridge_mdb_htable struct net_bridge_mdb_htable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment