madwifi: fix a rare ad-hoc mode crash
authorFelix Fietkau <nbd@openwrt.org>
Thu, 21 May 2009 18:23:53 +0000 (18:23 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 21 May 2009 18:23:53 +0000 (18:23 +0000)
SVN-Revision: 15964

package/madwifi/patches/435-ibss_neighbor_fix.patch [new file with mode: 0644]

diff --git a/package/madwifi/patches/435-ibss_neighbor_fix.patch b/package/madwifi/patches/435-ibss_neighbor_fix.patch
new file mode 100644 (file)
index 0000000..d66af9b
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/net80211/ieee80211_input.c
++++ b/net80211/ieee80211_input.c
+@@ -313,7 +313,7 @@ ieee80211_input(struct ieee80211vap * va
+                       if (type == IEEE80211_FC0_TYPE_DATA && ni == vap->iv_bss &&
+                                       !IEEE80211_ADDR_EQ(vap->iv_bss->ni_macaddr, wh->i_addr2)) {
+                               /* Try to find sender in local node table. */
+-                              ni = ieee80211_find_node(vap->iv_bss->ni_table, wh->i_addr2);
++                              ni = ieee80211_find_node(&ic->ic_sta, wh->i_addr2);
+                               if (ni == NULL) {
+                                       /*
+                                        * Fake up a node for this newly discovered