Date: Tue, 14 Jun 2011 17:25:20 GMT From: Catalin Nicutar <cnicutar@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 194757 for review Message-ID: <201106141725.p5EHPK74090897@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@194757?ac=10 Change 194757 by cnicutar@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106141725.p5EHPK74090897>