From owner-freebsd-bugs Fri Mar 8 03:38:32 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id DAA03724 for bugs-outgoing; Fri, 8 Mar 1996 03:38:32 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [204.156.134.254]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id DAA03716 for ; Fri, 8 Mar 1996 03:38:23 -0800 (PST) Received: (dillon@localhost) by apollo.backplane.com (8.6.12/8.6.5) id DAA00564; Fri, 8 Mar 1996 03:38:10 -0800 Date: Fri, 8 Mar 1996 03:38:10 -0800 From: Matthew Dillon Message-Id: <199603081138.DAA00564@apollo.backplane.com> To: bugs@freebsd.org Subject: bug in netinet/tcp_input.c Sender: owner-bugs@freebsd.org X-Loop: owner-bugs@FreeBSD.ORG Precedence: bulk This is a non-fatal bug that nevertheless defeats all of the recvpipe/sendpipe/mtu stuff in the routing tables. Specifically, the tcp_mssopt() procedure fails to use the rt->rt_rmx.rmx_mtu information when calculating the maximum segment size for outgoing connections. This results in the remote end sending us packets larger then we intend, messing up any fine tuning we tried to do with the route recvpipe/sendpipe/mtu. In anycase, the fix is simple. Here's a new tcp_mssopt() routine: int tcp_mssopt(tp) struct tcpcb *tp; { struct rtentry *rt; int mss; rt = tcp_rtlookup(tp->t_inpcb); if (rt == NULL) return tcp_mssdflt; mss = rt->rt_ifp->if_mtu; if (rt->rt_rmx.rmx_mtu) mss = min(mss, rt->rt_rmx.rmx_mtu); mss -= sizeof(struct tcpiphdr); if (mss < 20) mss = 20; return(mss); } Enjoy! -Matt Matthew Dillon Engineering, BEST Internet Communications, Inc. [always include a portion of the original email in any response!]