Date: Thu, 14 May 2009 16:23:24 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r192107 - head/sys/net80211 Message-ID: <200905141623.n4EGNOF8096166@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Thu May 14 16:23:24 2009 New Revision: 192107 URL: http://svn.freebsd.org/changeset/base/192107 Log: correct handling of ctl frames: the sender's address is always i_addr2 for frames we should expect to process (old code was trying to handle frames we should never see--like ACK) Reviewed by: thompsa, cbzimmer Modified: head/sys/net80211/ieee80211_node.c Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Thu May 14 16:01:29 2009 (r192106) +++ head/sys/net80211/ieee80211_node.c Thu May 14 16:23:24 2009 (r192107) @@ -1439,12 +1439,6 @@ ieee80211_add_neighbor(struct ieee80211v return ni; } -#define IS_CTL(wh) \ - ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL) -#define IS_PSPOLL(wh) \ - ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PS_POLL) -#define IS_BAR(wh) \ - ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_BAR) #define IS_PROBEREQ(wh) \ ((wh->i_fc[0] & (IEEE80211_FC0_TYPE_MASK|IEEE80211_FC0_SUBTYPE_MASK)) \ == (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_REQ)) @@ -1456,9 +1450,6 @@ static __inline struct ieee80211_node * _find_rxnode(struct ieee80211_node_table *nt, const struct ieee80211_frame_min *wh) { - /* XXX 4-address frames? */ - if (IS_CTL(wh) && !IS_PSPOLL(wh) && !IS_BAR(wh) /*&& !IS_RTS(ah)*/) - return ieee80211_find_node_locked(nt, wh->i_addr1); if (IS_BCAST_PROBEREQ(wh)) return NULL; /* spam bcast probe req to all vap's */ return ieee80211_find_node_locked(nt, wh->i_addr2); @@ -1547,9 +1538,6 @@ ieee80211_find_rxnode_withkey(struct iee } #undef IS_BCAST_PROBEREQ #undef IS_PROBEREQ -#undef IS_BAR -#undef IS_PSPOLL -#undef IS_CTL /* * Return a reference to the appropriate node for sending
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905141623.n4EGNOF8096166>