PERFORCE change 195838 for review
Catalin Nicutar
cnicutar at FreeBSD.org
Thu Jul 7 07:43:34 UTC 2011
http://p4web.freebsd.org/@@195838?ac=10
Change 195838 by cnicutar at cnicutar_cronos on 2011/07/07 07:43:12
Send UTO on SYN and on the first non-SYN segment sent (as advised
by RFC 5482, sections 3 and 4.1).
Affected files ...
.. //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_output.c#6 edit
.. //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_timer.c#5 edit
Differences ...
==== //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_output.c#6 (text+ko) ====
@@ -705,9 +705,16 @@
}
}
/* UTO */
- if ((flags & TH_SYN) && (tp->t_flags & TF_SND_UTO)) {
+ if (tp->t_flags & TF_SND_UTO) {
to.to_uto = tp->snd_uto;
to.to_flags |= TOF_UTO;
+ /*
+ * The option is sent with the SYN and with the first
+ * non-SYN segment.
+ */
+ if (!(flags & TH_SYN))
+ tp->t_flags &= ~TF_SND_UTO;
+
}
#ifdef TCP_SIGNATURE
/* TCP-MD5 (RFC2385). */
==== //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_timer.c#5 (text+ko) ====
@@ -305,8 +305,7 @@
return;
}
callout_deactivate(&tp->t_timers->tt_keep);
- if ((tp->t_flags & TF_SND_UTO) || ((tp->t_flags & TF_RCV_UTO) &&
- tp->rcv_uto)) {
+ if ((tp->snd_uto) || ((tp->t_flags & TF_RCV_UTO) && tp->rcv_uto)) {
/*
* This connection is using UTO (either sending or has
* received a value). We need to stop sending keepalives
@@ -493,8 +492,7 @@
/* UTO starting again since it's the first retransmit. */
tp->t_suto = 0;
- if ((tp->t_flags & TF_SND_UTO) || ((tp->t_flags & TF_RCV_UTO) &&
- tp->rcv_uto)) {
+ if (tp->snd_uto || ((tp->t_flags & TF_RCV_UTO) && tp->rcv_uto)) {
/*
* Since we're using UTO for this connection we need to
* compute how much time we've got left.
More information about the p4-projects
mailing list