aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-08-11 02:14:28 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-08-11 02:14:28 +0000
commitcc537168256cd66db9bfd53192f66209806f9ac8 (patch)
tree15022a6d1f4d0c74445010929190d7e0f6dbe984 /package/madwifi/patches
parentfe4ec9d81bb7f03754561ffeedfb15b5bfabeee4 (diff)
downloadupstream-cc537168256cd66db9bfd53192f66209806f9ac8.tar.gz
upstream-cc537168256cd66db9bfd53192f66209806f9ac8.tar.bz2
upstream-cc537168256cd66db9bfd53192f66209806f9ac8.zip
fix software rx filter for ibss mode (based on a patch by harald schiƶberg)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17220 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/patches')
-rw-r--r--package/madwifi/patches/442-ibss_rx_filter.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/madwifi/patches/442-ibss_rx_filter.patch b/package/madwifi/patches/442-ibss_rx_filter.patch
new file mode 100644
index 0000000000..eaf807118f
--- /dev/null
+++ b/package/madwifi/patches/442-ibss_rx_filter.patch
@@ -0,0 +1,20 @@
+--- a/net80211/ieee80211_input.c
++++ b/net80211/ieee80211_input.c
+@@ -294,6 +294,17 @@ ieee80211_input(struct ieee80211vap * va
+ break;
+ case IEEE80211_M_IBSS:
+ case IEEE80211_M_AHDEMO:
++ if (!IEEE80211_ADDR_EQ(wh->i_addr3, vap->iv_bssid) ||
++ (!IEEE80211_ADDR_EQ(wh->i_addr1, vap->iv_myaddr) &&
++ !IEEE80211_IS_MULTICAST(wh->i_addr1) &&
++ (subtype != IEEE80211_FC0_SUBTYPE_BEACON))) {
++ if (!(vap->iv_dev->flags & IFF_PROMISC)) {
++ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
++ bssid, NULL, "%s", "not to bss");
++ vap->iv_stats.is_rx_wrongbss++;
++ goto out;
++ }
++ }
+ if (dir != IEEE80211_FC1_DIR_NODS)
+ bssid = wh->i_addr1;
+ else if (type == IEEE80211_FC0_TYPE_CTL)