MFC r203422, r205516:

When receiving a management frame, pass the mbuf to bpf before calling
 iv_recv_mgmt(). iv_recv_mgmt() will generate management frame
 responses
 and pass them to bpf before the management frame that triggered the
 response.

 PR:		144323
 Submitted by:	Alexander Egorenkov <egorenar at gmail.com>
 Sponsored by:	iXsystems, inc.
This commit is contained in:
Rui Paulo 2010-04-06 14:07:48 +00:00
parent b02c965e31
commit 8d3cd908c4

View File

@ -884,6 +884,14 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
wh = mtod(m, struct ieee80211_frame *);
wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
}
/*
* Pass the packet to radiotap before calling iv_recv_mgmt().
* Otherwise iv_recv_mgmt() might pass another packet to
* radiotap, resulting in out of order packet captures.
*/
if (ieee80211_radiotap_active_vap(vap))
ieee80211_radiotap_rx(vap, m);
need_tap = 0;
vap->iv_recv_mgmt(ni, m, subtype, rssi, nf);
goto out;