Skip to content

Commit

Permalink
SCTP: Correctly disable listening when backlog is 0.
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
  • Loading branch information
Vlad Yasevich committed Aug 30, 2007
1 parent d0ce929 commit 498d630
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 498d630

Please sign in to comment.