Subject: Re: TCP MSS not adhered to properly when options present
To: None <>
From: Rick Byers <>
List: tech-net
Date: 12/01/2001 01:31:58
Ok, I've had a chance to look at this now...

> Hmmm, right after I post this I notice in tcp_segsize() that size is being
> decreased by tcp_optlen() (which returns TCPOLEN_TSTAMP_APPA if the
> timestamp options are set) and then uses the min of that size and the
> peer mss.  So it looks like it should be doing the right thing.  Sorry
> to reply to my own post, I will ensure that I am properly caffienated
> before future posts.

Its true size is being decreased, but txsegsizep is calculated as the
minimum of size and the mss advertised by the peer.  The option
lengths have to be subtracted from the mss advertised by the peer also.
I've written a patch that appears to fix this, and filed a PR: kern/14799.

Since the bug causes NetBSD to send packets largers than the receiver has
said it can receive, I consider this to be a serious bug.  Of course it
won't affect most people because most people have mtu=1500.  Anyway, could
someone please sanity check my work and committ it if it looks good?