Date: Mon, 13 Apr 2009 00:32:34 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190982 - head/sys/dev/fxp Message-ID: <200904130032.n3D0WYrc046567@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Mon Apr 13 00:32:34 2009 New Revision: 190982 URL: http://svn.freebsd.org/changeset/base/190982 Log: Don't blindly set IP packet length from interface MTU in TSO case. Remote host can advertise smaller MSS than that of sender so upper stack might have adjusted the MSS which in turn generates IP packets that are less size than that of interface MTU. Reported by: Bjoern Koenig ( bkoenig <> alpha-tierchen dot de ) Tested by: Bjoern Koenig ( bkoenig <> alpha-tierchen dot de ) MFC after: 3 days Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Sun Apr 12 23:10:01 2009 (r190981) +++ head/sys/dev/fxp/if_fxp.c Mon Apr 13 00:32:34 2009 (r190982) @@ -1485,7 +1485,8 @@ fxp_encap(struct fxp_softc *sc, struct m * checksum in the first frame driver should compute it. */ ip->ip_sum = 0; - ip->ip_len = htons(ifp->if_mtu); + ip->ip_len = htons(m->m_pkthdr.tso_segsz + (ip->ip_hl << 2) + + (tcp->th_off << 2)); tcp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(IPPROTO_TCP + (tcp->th_off << 2) + m->m_pkthdr.tso_segsz));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904130032.n3D0WYrc046567>