aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2011-04-07 18:08:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-12 16:57:38 -0400
commit53e805111b69d55834f4e1ed0a31a97ea0b9e425 (patch)
tree7bb12930aec57f5fb794f5e3c1c82710c26f0d8e /net/mac80211
parent71839121a0f35f9968d2e204a76eb22683156fd8 (diff)
mac80211: ignore peer link requests from unauthenticated stations.
Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mesh_plink.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index bafe25594e09..5d0dd9217e5f 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -372,6 +372,9 @@ int mesh_plink_open(struct sta_info *sta)
372 __le16 llid; 372 __le16 llid;
373 struct ieee80211_sub_if_data *sdata = sta->sdata; 373 struct ieee80211_sub_if_data *sdata = sta->sdata;
374 374
375 if (!test_sta_flags(sta, WLAN_STA_AUTH))
376 return -EPERM;
377
375 spin_lock_bh(&sta->lock); 378 spin_lock_bh(&sta->lock);
376 get_random_bytes(&llid, 2); 379 get_random_bytes(&llid, 2);
377 sta->llid = llid; 380 sta->llid = llid;
@@ -484,6 +487,12 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
484 return; 487 return;
485 } 488 }
486 489
490 if (sta && !test_sta_flags(sta, WLAN_STA_AUTH)) {
491 mpl_dbg("Mesh plink: Action frame from non-authed peer\n");
492 rcu_read_unlock();
493 return;
494 }
495
487 if (sta && sta->plink_state == PLINK_BLOCKED) { 496 if (sta && sta->plink_state == PLINK_BLOCKED) {
488 rcu_read_unlock(); 497 rcu_read_unlock();
489 return; 498 return;