summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2000-09-20 17:00:24 +0000
committerNiels Provos <provos@cvs.openbsd.org>2000-09-20 17:00:24 +0000
commit4b8370dd1c4bd6e2767ecbe164cb73e8ae337404 (patch)
tree4b79bf6fdbe32d96b777b51831c18364cb9b2c3e /sys/netinet/tcp_output.c
parentdc087a71e34204c41f6ef06c16a54e74c6ea00be (diff)
correctly calculate mss
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 8b6ad202982..f1ab4a5ab05 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.32 2000/09/18 22:06:38 provos Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.33 2000/09/20 17:00:22 provos Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -512,9 +512,13 @@ send:
opt[0] = TCPOPT_MAXSEG;
opt[1] = 4;
- mss = htons((u_int16_t) tcp_mss(tp, 0));
+ mss = htons((u_int16_t) tcp_mss(tp, flags & TH_ACK ?
+ tp->t_maxopd : 0));
bcopy((caddr_t)&mss, (caddr_t)(opt + 2), sizeof(mss));
optlen = 4;
+
+ if (flags & TH_ACK)
+ tcp_mss_update(tp);
#ifdef TCP_SACK
/*
* If this is the first SYN of connection (not a SYN