From f0380bfd826b44901938d8c1f5fb9bc34dacf94c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 11 Aug 2009 02:14:28 +0000 Subject: [PATCH] =?utf8?q?fix=20software=20rx=20filter=20for=20ibss=20mode?= =?utf8?q?=20(based=20on=20a=20patch=20by=20harald=20schi=C3=B6berg)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit SVN-Revision: 17220 --- .../madwifi/patches/442-ibss_rx_filter.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 package/madwifi/patches/442-ibss_rx_filter.patch 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) -- 2.30.2