From: Vladislav Yasevich Date: Fri, 19 May 2006 21:32:06 +0000 (-0700) Subject: [SCTP]: Allow linger to abort 1-N style sockets. X-Git-Tag: v2.6.17-rc5~91^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b89498a1c2941c00889dd025f52dcb653a5083bc;p=linux-2.6 [SCTP]: Allow linger to abort 1-N style sockets. Enable SO_LINGER functionality for 1-N style sockets. The socket API draft will be clarfied to allow for this functionality. The linger settings will apply to all associations on a given socket. Signed-off-by: Vladislav Yasevich Signed-off-by: Sridhar Samudrala --- diff --git a/net/sctp/socket.c b/net/sctp/socket.c index b1a1775800..174d4d35e9 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -1242,13 +1242,13 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout) if (sctp_state(asoc, CLOSED)) { sctp_unhash_established(asoc); sctp_association_free(asoc); + continue; + } + } - } else if (sock_flag(sk, SOCK_LINGER) && - !sk->sk_lingertime) - sctp_primitive_ABORT(asoc, NULL); - else - sctp_primitive_SHUTDOWN(asoc, NULL); - } else + if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) + sctp_primitive_ABORT(asoc, NULL); + else sctp_primitive_SHUTDOWN(asoc, NULL); }