Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215293
b: refs/heads/master
c: d12c745
h: refs/heads/master
i:
  215291: 7f88cb6
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Oct 11, 2010
1 parent ae92b5a commit 7d22690
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7109ca5c80a0bb94378ebd7f8bb6d00edb5e6fba
refs/heads/master: d12c74528e3065c90df70fbc06ec6ffd6e804738
17 changes: 14 additions & 3 deletions trunk/net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
enum plink_event event;
enum plink_frame_type ftype;
size_t baselen;
bool deactivated;
bool deactivated, matches_local = true;
u8 ie_len;
u8 *baseaddr;
__le16 plid, llid, reason;
Expand Down Expand Up @@ -487,6 +487,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
/* Now we will figure out the appropriate event... */
event = PLINK_UNDEFINED;
if (ftype != PLINK_CLOSE && (!mesh_matches_local(&elems, sdata))) {
matches_local = false;
switch (ftype) {
case PLINK_OPEN:
event = OPN_RJCT;
Expand All @@ -498,7 +499,15 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
/* avoid warning */
break;
}
spin_lock_bh(&sta->lock);
}

if (!sta && !matches_local) {
rcu_read_unlock();
reason = cpu_to_le16(MESH_CAPABILITY_POLICY_VIOLATION);
llid = 0;
mesh_plink_frame_tx(sdata, PLINK_CLOSE, mgmt->sa, llid,
plid, reason);
return;
} else if (!sta) {
/* ftype == PLINK_OPEN */
u32 rates;
Expand All @@ -522,7 +531,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
}
event = OPN_ACPT;
spin_lock_bh(&sta->lock);
} else {
} else if (matches_local) {
spin_lock_bh(&sta->lock);
switch (ftype) {
case PLINK_OPEN:
Expand Down Expand Up @@ -564,6 +573,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
rcu_read_unlock();
return;
}
} else {
spin_lock_bh(&sta->lock);
}

mpl_dbg("Mesh plink (peer, state, llid, plid, event): %pM %s %d %d %d\n",
Expand Down

0 comments on commit 7d22690

Please sign in to comment.