Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 498d6307 authored by Vlad Yasevich's avatar Vlad Yasevich
Browse files

SCTP: Correctly disable listening when backlog is 0.

parent d0ce9291
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5203,6 +5203,7 @@ SCTP_STATIC int sctp_seqpacket_listen(struct sock *sk, int backlog)

		sctp_unhash_endpoint(ep);
		sk->sk_state = SCTP_SS_CLOSED;
		return 0;
	}

	/* Return if we are already listening. */
@@ -5250,6 +5251,7 @@ SCTP_STATIC int sctp_stream_listen(struct sock *sk, int backlog)

		sctp_unhash_endpoint(ep);
		sk->sk_state = SCTP_SS_CLOSED;
		return 0;
	}

	if (sctp_sstate(sk, LISTENING))