Skip to content

Commit

Permalink
[SCTP]: Allow linger to abort 1-N style sockets.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladislav Yasevich authored and Sridhar Samudrala committed May 19, 2006
1 parent a601266 commit b89498a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit b89498a

Please sign in to comment.