|
@@ -7034,6 +7034,9 @@ int sctp_inet_listen(struct socket *sock, int backlog)
|
|
|
if (sock->state != SS_UNCONNECTED)
|
|
if (sock->state != SS_UNCONNECTED)
|
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
|
|
|
|
+ if (!sctp_sstate(sk, LISTENING) && !sctp_sstate(sk, CLOSED))
|
|
|
|
|
+ goto out;
|
|
|
|
|
+
|
|
|
/* If backlog is zero, disable listening. */
|
|
/* If backlog is zero, disable listening. */
|
|
|
if (!backlog) {
|
|
if (!backlog) {
|
|
|
if (sctp_sstate(sk, CLOSED))
|
|
if (sctp_sstate(sk, CLOSED))
|