tcp-fast-open revision acce4b333de469c687908f3a04381f2897d242e9
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCopyright (C) 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic UpdaterThis Source Code Form is subject to the terms of the Mozilla Public
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic UpdaterLicense, v. 2.0. If a copy of the MPL was not distributed with this
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updaterfile, You can obtain one at http://mozilla.org/MPL/2.0/.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntSome systems (Linux, FreeBSD, OS X/macOS and Windows 10) support
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updaterthe TCP Fast Open (RFC 7413) mechanism in their recent versions.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntBIND 9 supports this on the server side.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntWhen the TCP_FASTOPEN socket option is defined after the listen()
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntsystem call the socket code in the libisc set the option with
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntthe half of the listen backlog (so the fast open maximum queue length
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntis the half of the pending connection queue length).
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntAny failure is logged and ignored.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntSystem specific notes:
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - FreeBSD doesn't interpret the argument as a queue length but
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt only as an on/off switch.
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater - Using TCP Fast Open on FreeBSD, as of versions 10.3 and 11.0, requires
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt compiling a custom kernel and setting the "net.inet.tcp.fastopen.enabled"
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt sysctl to 1.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater - Apple OS X/macOS allows only 0 or 1 so the code puts 1 for this system.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - Windows 10 uses a 0/1 char flag? Note that TCP_FASTOPEN is defined
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt only in SDK 10.0.14393.0 or higher (Visual Studio 2015 requires
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt extra setting of the "Target Platform Version" in all project
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt properties).
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - the only other system known to support this is Linux.