Skip to content

[LTS 8.6] net/ulp: use consistent error code when blocking ULP #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions net/ipv4/inet_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ int inet_csk_listen_start(struct sock *sk, int backlog)
if (unlikely(err))
return err;

err = -EADDRINUSE;
reqsk_queue_alloc(&icsk->icsk_accept_queue);

sk->sk_ack_backlog = 0;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_ulp.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static int __tcp_set_ulp(struct sock *sk, const struct tcp_ulp_ops *ulp_ops)
if (icsk->icsk_ulp_ops)
goto out_err;

err = -EINVAL;
err = -ENOTCONN;
if (!ulp_ops->clone && sk->sk_state == TCP_LISTEN)
goto out_err;

Expand Down