mac80211: ibss should not purge clients it is not responsible for
authorMarek Lindner <lindner_marek@yahoo.de>
Tue, 20 Dec 2011 15:16:52 +0000 (23:16 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 21 Dec 2011 20:06:12 +0000 (15:06 -0500)
The IBSS merge code calls ieee80211_sta_expire() with a relatively
short expire timeout that purges other clients prematurely. The
expire function has to check that only the clients belonging to
the vif in question are purged.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/sta_info.c

index 3d01abb2b8137b7039c786d1b3f09221d7a02fb4..f0d3b483dabd5a00ebd513e1976b4228d46d34c0 100644 (file)
@@ -946,6 +946,9 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
 
        mutex_lock(&local->sta_mtx);
        list_for_each_entry_safe(sta, tmp, &local->sta_list, list)
+               if (sdata != sta->sdata)
+                       continue;
+
                if (time_after(jiffies, sta->last_rx + exp_time)) {
 #ifdef CONFIG_MAC80211_IBSS_DEBUG
                        printk(KERN_DEBUG "%s: expiring inactive STA %pM\n",