PMTUD can only lower TCP MSS (either the default one or the one
advertised by the peer), not raise it. This is how it was originally but
it regressed at some point. The comments still mention the correct
behaviour, but the code doesn't do what the comments say. This diff
fixes that.
Please test especially if you have unusual MTU, PMTUD, or MSS settings.
Index: tcp_input.c
===================================================================
RCS file: /cvs/src/sys/netinet/tcp_input.c,v
retrieving revision 1.232
diff -u -r1.232 tcp_input.c
--- tcp_input.c 11 Mar 2010 00:24:58 -0000 1.232
+++ tcp_input.c 15 Apr 2010 20:22:49 -0000
@@ -3092,7 +3092,7 @@
* from maxseg, because now every segment carries options
* and thus we normally have somewhat less data in segments.
*/
- tp->t_maxopd = mss;
+ tp->t_maxopd = offer == -1 ? min(mss, tp->t_maxopd) : mss;
if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
(tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP)
@@ -3122,7 +3122,7 @@
} else
tp->snd_cwnd = mss;
- tp->t_maxseg = mss;
+ tp->t_maxseg = offer == -1 ? min(mss, tp->t_maxseg) : mss;
return (offer != -1 ? mssopt : mss);
}
--
NAT64/DNS64 open-source --> http://ecdysis.viagenie.ca
STUN/TURN server --> http://numb.viagenie.ca
vCard 4.0 --> http://www.vcarddav.org