Date: Sun, 3 May 2015 23:40:13 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282402 - head/sys/dev/wpi Message-ID: <201505032340.t43NeD3E096710@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun May 3 23:40:12 2015 New Revision: 282402 URL: https://svnweb.freebsd.org/changeset/base/282402 Log: [iwn] Do not filter control frames in monitor mode. PR: kern/197143 Submitted by: Andriy Voskoboinyk <s3erios@gmail.com> Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun May 3 23:39:44 2015 (r282401) +++ head/sys/dev/wpi/if_wpi.c Sun May 3 23:40:12 2015 (r282402) @@ -1972,7 +1972,7 @@ wpi_rx_done(struct wpi_softc *sc, struct goto fail1; } /* Discard frames that are too short. */ - if (len < sizeof (*wh)) { + if (len < sizeof (struct ieee80211_frame_ack)) { DPRINTF(sc, WPI_DEBUG_RECV, "%s: frame too short: %d\n", __func__, len); goto fail1; @@ -2033,7 +2033,11 @@ wpi_rx_done(struct wpi_softc *sc, struct m->m_flags |= M_WEP; } - ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); + if (len >= sizeof(struct ieee80211_frame_min)) + ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); + else + ni = NULL; + sc->rx_tstamp = tail->tstamp; if (ieee80211_radiotap_active(ic)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505032340.t43NeD3E096710>