tcp: Increase TCP_MAXSEG socket option minimum.
commitfefec0cbd52b128b2b4d57c71eb6b54000039e33
authorDavid S. Miller <davem@davemloft.net>
Thu, 11 Nov 2010 05:35:37 +0000 (10 21:35 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:45:09 +0000 (21 12:45 -0700)
treefa07e4dec420761bb1d3943018fdd79adbf5fddf
parentaf25a83d14fd4d66e68bb28b9e0c3b60382025f2
tcp: Increase TCP_MAXSEG socket option minimum.

commit 7a1abd08d52fdeddb3e9a5a33f2f15cc6a5674d2 upstream.

As noted by Steve Chen, since commit
f5fff5dc8a7a3f395b0525c02ba92c95d42b7390 ("tcp: advertise MSS
requested by user") we can end up with a situation where
tcp_select_initial_window() does a divide by a zero (or
even negative) mss value.

The problem is that sometimes we effectively subtract
TCPOLEN_TSTAMP_ALIGNED and/or TCPOLEN_MD5SIG_ALIGNED from the mss.

Fix this by increasing the minimum from 8 to 64.

Reported-by: Steve Chen <schen@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/tcp.c