Date: Tue, 25 Jan 2011 23:20:23 +0000 (UTC) From: Jack F Vogel <jfv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r217865 - releng/8.2/sys/dev/e1000 Message-ID: <201101252320.p0PNKNsN056024@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jfv Date: Tue Jan 25 23:20:22 2011 New Revision: 217865 URL: http://svn.freebsd.org/changeset/base/217865 Log: MFC stable/8 r217711 Fix for kern/152853, pullup in the wrong place in em_xmit causes UDP failure. Thanks to Petr Lampa for the patch. Approved by: re (bz) Modified: releng/8.2/sys/dev/e1000/if_em.c Directory Properties: releng/8.2/sys/ (props changed) releng/8.2/sys/amd64/include/xen/ (props changed) releng/8.2/sys/cddl/contrib/opensolaris/ (props changed) releng/8.2/sys/contrib/dev/acpica/ (props changed) releng/8.2/sys/contrib/pf/ (props changed) Modified: releng/8.2/sys/dev/e1000/if_em.c ============================================================================== --- releng/8.2/sys/dev/e1000/if_em.c Tue Jan 25 23:04:57 2011 (r217864) +++ releng/8.2/sys/dev/e1000/if_em.c Tue Jan 25 23:20:22 2011 (r217865) @@ -1820,12 +1820,12 @@ em_xmit(struct tx_ring *txr, struct mbuf } ip = (struct ip *)(mtod(m_head, char *) + ip_off); poff = ip_off + (ip->ip_hl << 2); - m_head = m_pullup(m_head, poff + sizeof(struct tcphdr)); - if (m_head == NULL) { - *m_headp = NULL; - return (ENOBUFS); - } if (do_tso) { + m_head = m_pullup(m_head, poff + sizeof(struct tcphdr)); + if (m_head == NULL) { + *m_headp = NULL; + return (ENOBUFS); + } tp = (struct tcphdr *)(mtod(m_head, char *) + poff); /* * TSO workaround: @@ -1849,6 +1849,11 @@ em_xmit(struct tx_ring *txr, struct mbuf tp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(IPPROTO_TCP)); } else if (m_head->m_pkthdr.csum_flags & CSUM_TCP) { + m_head = m_pullup(m_head, poff + sizeof(struct tcphdr)); + if (m_head == NULL) { + *m_headp = NULL; + return (ENOBUFS); + } tp = (struct tcphdr *)(mtod(m_head, char *) + poff); m_head = m_pullup(m_head, poff + (tp->th_off << 2)); if (m_head == NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101252320.p0PNKNsN056024>