TCP Fast Open

Michael Tuexen tuexen at freebsd.org
Thu Dec 5 18:28:43 UTC 2019


> On 5. Dec 2019, at 16:25, Jeremy Harris <jgh at wizmail.org> wrote:
> 
> Hi,
> 
> 12.1 kernel with TCP_RFC7413
> net.inet.tcp.fastopen.server_enable: 1
> net.inet.tcp.fastopen.client_enable: 1
> 
> 
> Using code copied from
> https://people.freebsd.org/~pkelsey/tfo-tools/tfo-client.c
> 
> I'm not seeing any TFO option on SYN.  This is on a loopback
> connection.
> 
> Also, it appears to make no difference to the success of the
> sendto whether or not TCP_FASTOPEN was set on the socket, adding to
> the confusion.
> 
> What might I be doing wrong?
The program works (on FreeBSD head, but I do not expect a difference to 12.1).
However, you need a server having TCP FO enabled.

I would expect the TFO option being present on the first connection attempt.
If the server does not support TFO, the following attempts will not have the
option.

Can you provide the output of
sudo sysctl net.inet.tcp.fastopen.ccache_list
after at least one attempt.

On my system I see
> sudo sysctl net.inet.tcp.fastopen.ccache_list
net.inet.tcp.fastopen.ccache_list: 
Local IP address     Remote IP address     Port   MSS Disabled Cookie
127.0.0.1            127.0.0.1               80 16344       No 4c402b8365433ca7

Whether TFO is used or not has no impact on the return value of sendto().

Best regards
Michael
> -- 
> Cheers,
> Jeremy
> _______________________________________________
> freebsd-transport at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-transport
> To unsubscribe, send any mail to "freebsd-transport-unsubscribe at freebsd.org"



More information about the freebsd-transport mailing list