Skip to content

Commit ba2f83e

Browse files
uweberkuba-moo
authored andcommitted
doc: tls: socket needs to be established to enable ulp
To enable TLS ulp socket needs to be in established state. This was added in commit d91c3e1 ("net/tls: Only attach to sockets in ESTABLISHED state"), in 2018. Signed-off-by: Ulrich Weber <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 6e45773 commit ba2f83e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/networking/tls.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ User interface
1616
Creating a TLS connection
1717
-------------------------
1818

19-
First create a new TCP socket and set the TLS ULP.
19+
First create a new TCP socket and once the connection is established set the
20+
TLS ULP.
2021

2122
.. code-block:: c
2223
2324
sock = socket(AF_INET, SOCK_STREAM, 0);
25+
connect(sock, addr, addrlen);
2426
setsockopt(sock, SOL_TCP, TCP_ULP, "tls", sizeof("tls"));
2527
2628
Setting the TLS ULP allows us to set/get TLS socket options. Currently

0 commit comments

Comments
 (0)