PERFORCE change 194757 for review
Catalin Nicutar
cnicutar at FreeBSD.org
Tue Jun 14 17:25:22 UTC 2011
http://p4web.freebsd.org/@@194757?ac=10
Change 194757 by cnicutar at cnicutar_cronos on 2011/06/14 17:25:06
Send UTO on first SYN
Affected files ...
.. //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_output.c#2 edit
Differences ...
==== //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_output.c#2 (text+ko) ====
@@ -704,6 +704,11 @@
to.to_sacks = (u_char *)tp->sackblks;
}
}
+ /* UTO */
+ if ((flags & TH_SYN) && (tp->t_flags & TF_SND_UTO)) {
+ to.to_uto = tp->snd_uto;
+ to.to_flags |= TOF_UTO;
+ }
#ifdef TCP_SIGNATURE
/* TCP-MD5 (RFC2385). */
if (tp->t_flags & TF_SIGNATURE)
@@ -1370,6 +1375,21 @@
bcopy((u_char *)&to->to_mss, optp, sizeof(to->to_mss));
optp += sizeof(to->to_mss);
break;
+ case TOF_UTO:
+ while (optlen % 4) {
+ optlen += TCPOLEN_NOP;
+ *optp++ = TCPOPT_NOP;
+ }
+ if (TCP_MAXOLEN - optlen < TCPOLEN_UTO)
+ continue;
+ optlen += TCPOLEN_UTO;
+ *optp++ = TCPOPT_UTO;
+ *optp++ = TCPOLEN_UTO;
+
+ to->to_uto = htons(to->to_uto);
+ bcopy((u_char *)&to->to_uto, optp, sizeof(to->to_uto));
+ optp += sizeof(to->to_uto);
+ break;
case TOF_SCALE:
while (!optlen || optlen % 2 != 1) {
optlen += TCPOLEN_NOP;
More information about the p4-projects
mailing list