History log of /freebsd-current/sys/netinet/tcp_fastopen.c
Revision Date Author Comments
# 9b035689 22-Jan-2024 Gordon Bergling <gbe@FreeBSD.org>

tcp_fastopen: Fix a typo in a source code comment

- s/posession/possession/

MFC after: 3 days


# 224aec05 02-Sep-2023 Zhenlei Huang <zlei@FreeBSD.org>

tcp: Initialize the maximum number of entries in a client cookie cache bucket

This vnet loader tunable is defined with SYSCTL_PROC, thus will not be
initialized by kernel on vnet creating and will always have the default
value TCP_FASTOPEN_CCACHE_BUCKET_LIMIT_DEFAULT.

Fix by fetching the value from the corresponding kernel environment during
vnet constructing.

PR: 273509
Reviewed by: #transport, tuexen
Fixes: c560df6f12f1 This is an implementation of the client side of TCP Fast Open (TFO) [RFC7413]
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41691


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 9eb0e832 08-Nov-2022 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: provide macros to access inpcb and socket from a tcpcb

There should be no functional changes with this commit.

Reviewed by: rscheff
Differential revision: https://reviews.freebsd.org/D37123


# 662c1305 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

net: clean up empty lines in .c and .h files


# 7029da5c 26-Feb-2020 Pawel Biernacki <kaktus@FreeBSD.org>

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718


# 481be5de 12-Feb-2020 Randall Stewart <rrs@FreeBSD.org>

White space cleanup -- remove trailing tab's or spaces
from any line.

Sponsored by: Netflix Inc.


# 5f901c92 24-Jul-2018 Andrew Turner <andrew@FreeBSD.org>

Use the new VNET_DEFINE_STATIC macro when we are defining static VNET
variables.

Reviewed by: bz
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D16147


# c9da5853 10-Jul-2018 Michael Tuexen <tuexen@FreeBSD.org>

Add support for printing the TCP FO client-side cookie cache via the
sysctl interface. This is similar to the TCP host cache.

Reviewed by: pkelsey@, kbowling@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D14554


# c556884f 07-Jul-2018 Michael Tuexen <tuexen@FreeBSD.org>

When initializing the TCP FO client cookie cache, take into account
whether the TCP FO support is enabled or not for the client side.

The code in tcp_fastopen_init() implicitly assumed that the sysctl
variable V_tcp_fastopen_client_enable was initialized to 0. This
was initially true, but was changed in r335610, which unmasked this
bug.

Thanks to Pieter de Goeje for reporting the issue on freebsd-net@


# af4da586 24-Jun-2018 Sean Bruno <sbruno@FreeBSD.org>

Enable TCP_FASTOPEN by default for FreeBSD 12.

Submitted by: kbowling
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D15959


# 21f6fe2d 18-May-2018 Matt Macy <mmacy@FreeBSD.org>

tcp fastopen: fix may be uninitialized


# 1c714531 27-Feb-2018 Michael Tuexen <tuexen@FreeBSD.org>

When checking the TCP fast cookie length, conststently also check
for the minimum length.

This fixes a bug where cookies of length 2 bytes (which is smaller
than the minimum length of 4) is provided by the server.

Sponsored by: Netflix, Inc.


# 1f13c23f 26-Feb-2018 Patrick Kelsey <pkelsey@FreeBSD.org>

Ensure signed comparison to avoid false trip of assert during VNET teardown.

Reported by: lwhsu
MFC after: 1 month


# c560df6f 25-Feb-2018 Patrick Kelsey <pkelsey@FreeBSD.org>

This is an implementation of the client side of TCP Fast Open (TFO)
[RFC7413]. It also includes a pre-shared key mode of operation in
which the server requires the client to be in possession of a shared
secret in order to successfully open TFO connections with that server.

The names of some existing fastopen sysctls have changed (e.g.,
net.inet.tcp.fastopen.enabled -> net.inet.tcp.fastopen.server_enable).

Reviewed by: tuexen
MFC after: 1 month
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D14047


# 798caa2e 25-Feb-2018 Patrick Kelsey <pkelsey@FreeBSD.org>

Fix harmless locking bug in tfp_fastopen_check_cookie().

The keylist lock was not being acquired early enough. The only side
effect of this bug is that the effective add time of a new key could
be slightly later than it would have been otherwise, as seen by a TFO
client.

Reviewed by: tuexen
MFC after: 1 month
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D14046


# ec93ed8d 03-Feb-2017 Patrick Kelsey <pkelsey@FreeBSD.org>

Fix VIMAGE-related bugs in TFO. The autokey callout vnet context was
not being initialized, and the per-vnet fastopen context was only
being initialized for the default vnet.

PR: 216613
Reported by: Alex Deiter <alex dot deiter at gmail dot com>
MFC after: 1 week


# bca0155f 11-Aug-2016 Mike Karels <karels@FreeBSD.org>

Fix kernel build with TCP_RFC7413 option

The current in_pcb.h includes route.h, which includes sockaddr structures.
Including <sys/socketvar.h> should require <sys/socket.h>; add it in
the appropriate place.

PR: 211385
Submitted by: Sergey Kandaurov and iron at mail.ua
Reviewed by: gnn
Approved by: gnn (mentor)
MFC after: 1 day


# f254aeda 09-Apr-2016 Bjoern A. Zeeb <bz@FreeBSD.org>

Mfp: r296259

We attach the "counter" to the tcpcbs. Thus don't free the
TCP Fastopen zone before the tcpcbs are gone, as otherwise
the zone won't be empty.
With that it should be safe to destroy the "tfo" zone without
leaking the memory.

PR: 164763
Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5731


# 281a0fd4 24-Dec-2015 Patrick Kelsey <pkelsey@FreeBSD.org>

Implementation of server-side TCP Fast Open (TFO) [RFC7413].

TFO is disabled by default in the kernel build. See the top comment
in sys/netinet/tcp_fastopen.c for implementation particulars.

Reviewed by: gnn, jch, stas
MFC after: 3 days
Sponsored by: Verisign, Inc.
Differential Revision: https://reviews.freebsd.org/D4350