]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
llc: Return -EINPROGRESS from llc_ui_connect()
authorErnestas Kulik <ernestas.k@iconn-networks.com>
Tue, 21 Apr 2026 06:02:26 +0000 (09:02 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Apr 2026 18:40:39 +0000 (11:40 -0700)
commit864ba40c80edae2b98f47d46f2c39399126aa3d6
tree5a0c65333712b28a7ae4cb1be43a5d845dec9494
parent67bf002a2d7387a6312138210d0bd06e3cf4879b
llc: Return -EINPROGRESS from llc_ui_connect()

Given a zero sk_sndtimeo, llc_ui_connect() skips waiting for state
change and returns 0, confusing userspace applications that will assume
the socket is connected, making e.g. getpeername() calls error out.

More specifically, the issue was discovered in libcoap, where
newly-added AF_LLC socket support was behaving differently from AF_INET
connections due to EINPROGRESS handling being skipped.

Set rc to -EINPROGRESS if connect() would not block, akin to AF_INET
sockets.

Signed-off-by: Ernestas Kulik <ernestas.k@iconn-networks.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260421060304.285419-1-ernestas.k@iconn-networks.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/llc/af_llc.c