diff options
Diffstat (limited to 'sys/net80211/ieee80211_hostap.c')
-rw-r--r-- | sys/net80211/ieee80211_hostap.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 5b16a8dde952..e0d10ec907f0 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -831,11 +831,8 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_WEP; } - if (bpf_peers_present(vap->iv_rawbpf)) - bpf_mtap(vap->iv_rawbpf, m); vap->iv_recv_mgmt(ni, m, subtype, rssi, noise, rstamp); - m_freem(m); - return IEEE80211_FC0_TYPE_MGT; + goto out; case IEEE80211_FC0_TYPE_CTL: vap->iv_stats.is_rx_ctl++; @@ -859,7 +856,7 @@ err: ifp->if_ierrors++; out: if (m != NULL) { - if (bpf_peers_present(vap->iv_rawbpf) && need_tap) + if (need_tap && bpf_peers_present(vap->iv_rawbpf)) bpf_mtap(vap->iv_rawbpf, m); m_freem(m); } |