]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tcp: Make TCP_MAXSEG minimum more correct.
authorDavid S. Miller <davem@davemloft.net>
Wed, 24 Nov 2010 19:47:22 +0000 (11:47 -0800)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Apr 2011 14:53:05 +0000 (16:53 +0200)
commit c39508d6f118308355468314ff414644115a07f3 upstream.

Use TCP_MIN_MSS instead of constant 64.

Reported-by: Min Zhang <mzhang@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

index 87538ed935b3f6bbb5b39ef4327b561dc5103840..8ae8ea8c1d5de022bebced1ecab09654f4bb01c9 100644 (file)
@@ -2033,7 +2033,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
                /* Values greater than interface MTU won't take effect. However
                 * at the point when this call is done we typically don't yet
                 * know which interface is going to be used */
-               if (val < 64 || val > MAX_TCP_WINDOW) {
+               if (val < TCP_MIN_MSS || val > MAX_TCP_WINDOW) {
                        err = -EINVAL;
                        break;
                }