Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Feb 2009 02:06:15 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r188363 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/msk
Message-ID:  <200902090206.n1926Fgg041601@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Mon Feb  9 02:06:15 2009
New Revision: 188363
URL: http://svn.freebsd.org/changeset/base/188363

Log:
  MFC r187207:
    Correct frame length argument of in_cksum_skip. While I'm here
    remove intermediate variable csum.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/msk/if_msk.c

Modified: stable/7/sys/dev/msk/if_msk.c
==============================================================================
--- stable/7/sys/dev/msk/if_msk.c	Mon Feb  9 02:03:49 2009	(r188362)
+++ stable/7/sys/dev/msk/if_msk.c	Mon Feb  9 02:06:15 2009	(r188363)
@@ -2608,17 +2608,14 @@ msk_encap(struct msk_if_softc *sc_if, st
 		 */
 		if (m->m_pkthdr.len < MSK_MIN_FRAMELEN &&
 		    (m->m_pkthdr.csum_flags & CSUM_TCP) != 0) {
-			uint16_t csum;
-
 			m = m_pullup(m, offset + sizeof(struct tcphdr));
 			if (m == NULL) {
 				*m_head = NULL;
 				return (ENOBUFS);
 			}
-			csum = in_cksum_skip(m, ntohs(ip->ip_len) + offset -
-			    (ip->ip_hl << 2), offset);
 			*(uint16_t *)(m->m_data + offset +
-			    m->m_pkthdr.csum_data) = csum;
+			    m->m_pkthdr.csum_data) = in_cksum_skip(m,
+			    m->m_pkthdr.len, offset);
 			m->m_pkthdr.csum_flags &= ~CSUM_TCP;
 		}
 		if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) {



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