PERFORCE change 65682 for review
Sam Leffler
sam at FreeBSD.org
Tue Nov 23 03:44:40 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=65682
Change 65682 by sam at sam_ebb on 2004/11/23 03:44:16
correct packet length calculation for the case where
data padding is done
Affected files ...
.. //depot/projects/wifi/sys/dev/ath/if_ath.c#25 edit
Differences ...
==== //depot/projects/wifi/sys/dev/ath/if_ath.c#25 (text+ko) ====
@@ -2716,7 +2716,11 @@
iswep = wh->i_fc[1] & IEEE80211_FC1_WEP;
ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1);
hdrlen = ieee80211_anyhdrsize(wh);
- pktlen = m0->m_pkthdr.len;
+ /*
+ * Packet length must not include by any
+ * pad bytes; deduct it here.
+ */
+ pktlen = m0->m_pkthdr.len - (hdrlen & 3);
if (iswep) {
const struct ieee80211_cipher *cip;
More information about the p4-projects
mailing list