Re: [PATCH v3] llc: Return -EINPROGRESS from llc_ui_connect()
From: Simon Horman
Date: Thu Apr 23 2026 - 13:29:30 EST
On Tue, Apr 21, 2026 at 09:02:26AM +0300, Ernestas Kulik wrote:
> 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@xxxxxxxxxxxxxxxxxx>
> ---
> v2:
> - Add note about discovering the issue
> - Make rc assignment conditional
> v3:
> - Fix commit message after v2 changes
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>