Revert "sctp: set sk_state back to CLOSED if autobind fails in sctp_listen_start"

This reverts commit cf4a4858f8.
This commit is contained in:
Ksawlii 2024-11-24 00:23:12 +01:00
parent 5bd693c00e
commit 5bdee7aa98

View file

@ -8288,10 +8288,8 @@ static int sctp_listen_start(struct sock *sk, int backlog)
*/
inet_sk_set_state(sk, SCTP_SS_LISTENING);
if (!ep->base.bind_addr.port) {
if (sctp_autobind(sk)) {
inet_sk_set_state(sk, SCTP_SS_CLOSED);
if (sctp_autobind(sk))
return -EAGAIN;
}
} else {
if (sctp_get_port(sk, inet_sk(sk)->inet_num)) {
inet_sk_set_state(sk, SCTP_SS_CLOSED);