Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 1996 03:38:10 -0800
From:      Matthew Dillon <dillon@backplane.com>
To:        bugs@freebsd.org
Subject:   bug in netinet/tcp_input.c
Message-ID:  <199603081138.DAA00564@apollo.backplane.com>

next in thread | raw e-mail | index | archive | help
    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.
		     <dillon@apollo.backplane.com>
    [always include a portion of the original email in any response!]



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