提交 53e80511 编写于 作者: J Javier Cardona 提交者: John W. Linville

mac80211: ignore peer link requests from unauthenticated stations.

Signed-off-by: NJavier Cardona <javier@cozybit.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 71839121
......@@ -372,6 +372,9 @@ int mesh_plink_open(struct sta_info *sta)
__le16 llid;
struct ieee80211_sub_if_data *sdata = sta->sdata;
if (!test_sta_flags(sta, WLAN_STA_AUTH))
return -EPERM;
spin_lock_bh(&sta->lock);
get_random_bytes(&llid, 2);
sta->llid = llid;
......@@ -484,6 +487,12 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
return;
}
if (sta && !test_sta_flags(sta, WLAN_STA_AUTH)) {
mpl_dbg("Mesh plink: Action frame from non-authed peer\n");
rcu_read_unlock();
return;
}
if (sta && sta->plink_state == PLINK_BLOCKED) {
rcu_read_unlock();
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册