madwifi: fix another ibss crash (#5935)
[openwrt.git] / package / madwifi / patches / 451-ibss_race_fix.patch
1 --- a/net80211/ieee80211_input.c
2 +++ b/net80211/ieee80211_input.c
3 @@ -3573,6 +3573,9 @@ ieee80211_recv_mgmt(struct ieee80211vap
4 found = 1;
5 ni = ni_or_null = vap->iv_wdsnode;
6 } else if (vap->iv_opmode == IEEE80211_M_IBSS) {
7 + if (vap->iv_state != IEEE80211_S_RUN)
8 + break;
9 +
10 ni_or_null = ieee80211_find_node(&ic->ic_sta, wh->i_addr2);
11 if (ni_or_null)
12 ni = ni_or_null;
13 --- a/net80211/ieee80211_node.c
14 +++ b/net80211/ieee80211_node.c
15 @@ -317,16 +317,10 @@ ieee80211_create_ibss(struct ieee80211va
16 /* Check to see if we already have a node for this mac
17 * NB: we gain a node reference here
18 */
19 - ni = ieee80211_find_txnode(vap, vap->iv_myaddr);
20 + ni = ieee80211_alloc_node(vap, vap->iv_myaddr);
21 if (ni == NULL) {
22 - ni = ieee80211_alloc_node_table(vap, vap->iv_myaddr);
23 - IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
24 - "%s: ni:%p allocated for " MAC_FMT "\n",
25 - __func__, ni, MAC_ADDR(vap->iv_myaddr));
26 - if (ni == NULL) {
27 - /* XXX recovery? */
28 - return;
29 - }
30 + /* XXX recovery? */
31 + return;
32 }
33
34 IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_myaddr);
This page took 0.0465 seconds and 5 git commands to generate.