Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Nov 2004 03:44:39 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 65682 for review
Message-ID:  <200411230344.iAN3idPC002075@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65682

Change 65682 by sam@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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411230344.iAN3idPC002075>