Subtract optlen in the maximum length check for TSO and finally avoid

slightly oversized TSO mbuf chains.

Submitted by:	kmacy
This commit is contained in:
andre 2007-03-21 19:04:07 +00:00
parent 8bf685df51
commit 46edec2346

View File

@ -717,7 +717,7 @@ send:
if (len + optlen + ipoptlen > tp->t_maxopd) {
flags &= ~TH_FIN;
if (tso) {
if (len > TCP_MAXWIN - hdrlen) {
if (len > TCP_MAXWIN - hdrlen - optlen) {
len = TCP_MAXWIN - hdrlen - optlen;
len = len - (len % (tp->t_maxopd - optlen));
sendalot = 1;