]> err.no Git - linux-2.6/commitdiff
[SCTP]: Allow linger to abort 1-N style sockets.
authorVladislav Yasevich <vladislav.yasevich@hp.com>
Fri, 19 May 2006 21:32:06 +0000 (14:32 -0700)
committerSridhar Samudrala <sri@us.ibm.com>
Fri, 19 May 2006 21:32:06 +0000 (14:32 -0700)
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 <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
net/sctp/socket.c

index b1a17758003a1979d44f4eaee0fc3e71323a7cd8..174d4d35e951590d7bef5d10df113afe36f88ae6 100644 (file)
@@ -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);
        }