ACCF_TLS(9)
β¨ NAME β¨
okay bestie, welcome to the ACCF_TLS(9) page from the Kernel Developer's Manual β manual name folded in, no boring header copy needed π
. accf_tls is a filter that buffers incoming connections until a TLS handshake like request arrives. periodt. β¨
πΈ SYNOPSIS πΈ
options INET
options ACCEPT_FILTER_TLS
and in rc.conf(5):
kld_list="accf_tls"
π¦ DESCRIPTION π¦
So here's the tea: this is a filter you place on a socket that will be using accept(2) to receive incoming HTTPS connections. It prevents the application from receiving the connected descriptor via accept(2) until a full TLS handshake has been buffered by the kernel. π«Ά
The accf_tls will first check that the byte at offset 0 is 0x16, which matches the handshake type. Then it will read the 2-byte request length value at offset 3 and will continue reading until reading the entire length of the handshake is buffered. If something other than 0x16 is at offset 0, the kernel will allow the application to receive the connection descriptor via accept(2). π
The utility of accf_tls is such that a server will not have to context switch several times before performing the initial parsing of the request. This effectively reduces the amount of required CPU utilization to handle incoming requests by keeping active processes in preforking servers such as Apache low and reducing the size of the file descriptor set that needs to be managed by interfaces such as select(), poll() or kevent() based servers. lowkey iconic CPU savings π₯
π EXAMPLES π
Assuming ACCEPT_FILTER_TLS has been included in the kernel config file or the accf_tls module has been loaded, this will enable the TLS accept filter on the socket sok. π
struct accept_filter_arg afa;
bzero(&afa, sizeof(afa));
strcpy(afa.af_name, "tlsready");
setsockopt(sok, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
π SEE ALSO π
π HISTORY π
The accf_tls accept filter was introduced in FreeBSD 15.0. π§
π AUTHORS π
The accf_tls filter was written by Maksim Yevmenkin. π
and that's the whole page, bestie! this is the Debian version of ACCF_TLS(9), dated April 24, 2024 β mwah! π β¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2024 Gleb Smirnoff <glebius@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms