aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2014-06-28 16:35:25 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-08-26 05:12:55 -0400
commit6c6fa49649dc826b7ef81314324fe55cf1d0d954 (patch)
treeab068067daf2b32b9ae47bf7fc4f42adc49819af /net/mac80211/mesh_plink.c
parent3918edb0e6a8b16c2866f4657d9fed41f9da562d (diff)
mac80211: mesh_plink: handle confirm frames with new plid
The 802.11 standard says when processing a plink confirm frame: "If the peerLinkID in the mesh peering instance has not been set, the Local Link ID field of the Mesh Peering Confirm request shall be copied into the peerLinkID in the mesh peering instance." We were only doing this when receiving an open peering frame, but it could happen that the open frame gets lost and so we should handle this case rather than rejecting the confirm and failing the whole peering process. Reported-by: Yu Niiro <yu.niiro@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 63b874101b27..c47194d27149 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -959,7 +959,8 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata,
959 if (!matches_local) 959 if (!matches_local)
960 event = CNF_RJCT; 960 event = CNF_RJCT;
961 if (!mesh_plink_free_count(sdata) || 961 if (!mesh_plink_free_count(sdata) ||
962 (sta->llid != llid || sta->plid != plid)) 962 sta->llid != llid ||
963 (sta->plid && sta->plid != plid))
963 event = CNF_IGNR; 964 event = CNF_IGNR;
964 else 965 else
965 event = CNF_ACPT; 966 event = CNF_ACPT;
@@ -1080,6 +1081,10 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
1080 goto unlock_rcu; 1081 goto unlock_rcu;
1081 } 1082 }
1082 1083
1084 /* 802.11-2012 13.3.7.2 - update plid on CNF if not set */
1085 if (!sta->plid && event == CNF_ACPT)
1086 sta->plid = plid;
1087
1083 changed |= mesh_plink_fsm(sdata, sta, event); 1088 changed |= mesh_plink_fsm(sdata, sta, event);
1084 1089
1085unlock_rcu: 1090unlock_rcu: