summaryrefslogtreecommitdiff
path: root/package/madwifi/patches/128-adhoc_memleak.patch
blob: 3fca4ef983dd25b165a71b14ba966f6cdb43bf24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: madwifi-ng-r2568-20070710/net80211/ieee80211_input.c
===================================================================
--- madwifi-ng-r2568-20070710.orig/net80211/ieee80211_input.c	2007-07-24 00:01:54.068861828 +0200
+++ madwifi-ng-r2568-20070710/net80211/ieee80211_input.c	2007-07-24 00:02:44.035709278 +0200
@@ -2875,7 +2875,7 @@
 		}
 		if ((vap->iv_opmode == IEEE80211_M_IBSS) && 
 				(scan.capinfo & IEEE80211_CAPINFO_IBSS)) {
-			if (!IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) {
+			if (ni == vap->iv_bss) {
 				/* Create a new entry in the neighbor table. */
 				ni = ieee80211_add_neighbor(vap, wh, &scan);
 			} else {
Index: madwifi-ng-r2568-20070710/net80211/ieee80211_node.c
===================================================================
--- madwifi-ng-r2568-20070710.orig/net80211/ieee80211_node.c	2007-07-24 00:02:51.284122342 +0200
+++ madwifi-ng-r2568-20070710/net80211/ieee80211_node.c	2007-07-24 00:03:04.540877800 +0200
@@ -1205,7 +1205,7 @@
 	struct ieee80211com *ic = vap->iv_ic;
 	struct ieee80211_node *ni;
 
-	ni = ieee80211_dup_bss(vap, wh->i_addr2, 1);
+	ni = ieee80211_dup_bss(vap, wh->i_addr2, 0);
 	if (ni != NULL) {
 		ni->ni_esslen = sp->ssid[1];
 		memcpy(ni->ni_essid, sp->ssid + 2, sp->ssid[1]);