diff options
author | andre <andre@FreeBSD.org> | 2006-06-26 17:54:53 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2006-06-26 17:54:53 +0000 |
commit | 823f6f19d1ca9d3213ac4ade9e371efc759c16bb (patch) | |
tree | 2b20a592a140a3af20222651707004c287e4a486 /sys/netinet | |
parent | c397bdf30f4914e1254a9f7b984efec070fefc16 (diff) | |
download | FreeBSD-src-823f6f19d1ca9d3213ac4ade9e371efc759c16bb.zip FreeBSD-src-823f6f19d1ca9d3213ac4ade9e371efc759c16bb.tar.gz |
In syncache_respond() do not reply with a MSS that is larger than what
the peer announced to us but make it at least tcp_minmss in size.
Sponsored by: TCP/IP Optimization Fundraise 2005
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 5a9693c..b45a8ca 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1047,6 +1047,8 @@ syncache_respond(struct syncache *sc, struct mbuf *m) /* Determine MSS we advertize to other end of connection. */ mssopt = tcp_mssopt(&sc->sc_inc); + if (sc->sc_peer_mss) + mssopt = max( min(sc->sc_peer_mss, mssopt), tcp_minmss); /* Compute the size of the TCP options. */ if (sc->sc_flags & SCF_NOOPT) { |