net: bridge: Rename mglist to host_joined
authorAndrew Lunn <andrew@lunn.ch>
Thu, 9 Nov 2017 22:10:57 +0000 (23:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Nov 2017 04:41:40 +0000 (13:41 +0900)
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: 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>
net/bridge/br_input.c
net/bridge/br_mdb.c
net/bridge/br_multicast.c
net/bridge/br_private.h

index a096d3e189dafb54d8e4512aa696145149c025f8..7f98a7d25866d45436045b14318e18647fb6cf91 100644 (file)
@@ -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);
                if ((mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) &&
                    br_multicast_querier_exists(br, eth_hdr(skb))) {
-                       if ((mdst && mdst->mglist) ||
+                       if ((mdst && mdst->host_joined) ||
                            br_multicast_is_router(br)) {
                                local_rcv = true;
                                br->dev->stats.multicast++;
index 31ddff22563e1e0e7e11e2cccba2d9c36a058c3a..aa716a33cb71b1e4437e67f21ae92fcc8629091b 100644 (file)
@@ -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);
                err = 0;
 
-               if (!mp->ports && !mp->mglist &&
+               if (!mp->ports && !mp->host_joined &&
                    netif_running(br->dev))
                        mod_timer(&mp->timer, jiffies);
                break;
index 5f7f0e9d446c4a5f0684be139c8186f208d2bed0..bfe5adb1f51c450fdc65c22eee6703c739a9eeb8 100644 (file)
@@ -249,7 +249,7 @@ static void br_multicast_group_expired(struct timer_list *t)
        if (!netif_running(br->dev) || timer_pending(&mp->timer))
                goto out;
 
-       mp->mglist = false;
+       mp->host_joined = false;
 
        if (mp->ports)
                goto out;
@@ -292,7 +292,7 @@ static void br_multicast_del_pg(struct net_bridge *br,
                              p->flags);
                call_rcu_bh(&p->rcu, br_multicast_free_pg);
 
-               if (!mp->ports && !mp->mglist &&
+               if (!mp->ports && !mp->host_joined &&
                    netif_running(br->dev))
                        mod_timer(&mp->timer, jiffies);
 
@@ -773,7 +773,7 @@ static int br_multicast_add_group(struct net_bridge *br,
                goto err;
 
        if (!port) {
-               mp->mglist = true;
+               mp->host_joined = true;
                mod_timer(&mp->timer, now + br->multicast_membership_interval);
                goto out;
        }
@@ -1477,7 +1477,7 @@ static int br_ip4_multicast_query(struct net_bridge *br,
 
        max_delay *= br->multicast_last_member_count;
 
-       if (mp->mglist &&
+       if (mp->host_joined &&
            (timer_pending(&mp->timer) ?
             time_after(mp->timer.expires, now + max_delay) :
             try_to_del_timer_sync(&mp->timer) >= 0))
@@ -1561,7 +1561,7 @@ static int br_ip6_multicast_query(struct net_bridge *br,
                goto out;
 
        max_delay *= br->multicast_last_member_count;
-       if (mp->mglist &&
+       if (mp->host_joined &&
            (timer_pending(&mp->timer) ?
             time_after(mp->timer.expires, now + max_delay) :
             try_to_del_timer_sync(&mp->timer) >= 0))
@@ -1622,7 +1622,7 @@ br_multicast_leave_group(struct net_bridge *br,
                        br_mdb_notify(br->dev, port, group, RTM_DELMDB,
                                      p->flags);
 
-                       if (!mp->ports && !mp->mglist &&
+                       if (!mp->ports && !mp->host_joined &&
                            netif_running(br->dev))
                                mod_timer(&mp->timer, jiffies);
                }
@@ -1662,7 +1662,7 @@ br_multicast_leave_group(struct net_bridge *br,
                     br->multicast_last_member_interval;
 
        if (!port) {
-               if (mp->mglist &&
+               if (mp->host_joined &&
                    (timer_pending(&mp->timer) ?
                     time_after(mp->timer.expires, time) :
                     try_to_del_timer_sync(&mp->timer) >= 0)) {
index 40553d832b6ef9f8de1aae5b49d083840debbffa..1312b8d20ec3d1c4b90c1c57b94b16c49ebb1d3a 100644 (file)
@@ -209,7 +209,7 @@ struct net_bridge_mdb_entry
        struct rcu_head                 rcu;
        struct timer_list               timer;
        struct br_ip                    addr;
-       bool                            mglist;
+       bool                            host_joined;
 };
 
 struct net_bridge_mdb_htable