summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_reass.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2007-03-15 15:59:28 +0000
committerandre <andre@FreeBSD.org>2007-03-15 15:59:28 +0000
commitda1f4962209103a9c4b8de8081614312a2c05864 (patch)
tree958c5cc9f9700b70c7ad5f201a98774762724e25 /sys/netinet/tcp_reass.c
parente384ffc370ce3185a1575f148f487dbaad04de2c (diff)
downloadFreeBSD-src-da1f4962209103a9c4b8de8081614312a2c05864.zip
FreeBSD-src-da1f4962209103a9c4b8de8081614312a2c05864.tar.gz
Consolidate insertion of TCP options into a segment from within tcp_output()
and syncache_respond() into its own generic function tcp_addoptions(). tcp_addoptions() is alignment agnostic and does optimal packing in all cases. In struct tcpopt rename to_requested_s_scale to just to_wscale. Add a comment with quote from RFC1323: "The Window field in a SYN (i.e., a <SYN> or <SYN,ACK>) segment itself is never scaled." Reviewed by: silby, mohans, julian Sponsored by: TCP/IP Optimization Fundraise 2005
Diffstat (limited to 'sys/netinet/tcp_reass.c')
-rw-r--r--sys/netinet/tcp_reass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 2d88d47..eb51349 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -1146,7 +1146,7 @@ after_listen:
if ((to.to_flags & TOF_SCALE) &&
(tp->t_flags & TF_REQ_SCALE)) {
tp->t_flags |= TF_RCVD_SCALE;
- tp->snd_scale = to.to_requested_s_scale;
+ tp->snd_scale = to.to_wscale;
tp->snd_wnd = th->th_win << tp->snd_scale;
tiwin = tp->snd_wnd;
}
@@ -2745,7 +2745,7 @@ tcp_dooptions(to, cp, cnt, flags)
if (!(flags & TO_SYN))
continue;
to->to_flags |= TOF_SCALE;
- to->to_requested_s_scale = min(cp[2], TCP_MAX_WINSHIFT);
+ to->to_wscale = min(cp[2], TCP_MAX_WINSHIFT);
break;
case TCPOPT_TIMESTAMP:
if (optlen != TCPOLEN_TIMESTAMP)
OpenPOWER on IntegriCloud