提交 b89498a1 编写于 作者: V Vladislav Yasevich 提交者: Sridhar Samudrala

[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: NVladislav Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: NSridhar Samudrala <sri@us.ibm.com>
上级 a601266e
...@@ -1242,14 +1242,14 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout) ...@@ -1242,14 +1242,14 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout)
if (sctp_state(asoc, CLOSED)) { if (sctp_state(asoc, CLOSED)) {
sctp_unhash_established(asoc); sctp_unhash_established(asoc);
sctp_association_free(asoc); sctp_association_free(asoc);
continue;
}
}
} else if (sock_flag(sk, SOCK_LINGER) && if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime)
!sk->sk_lingertime)
sctp_primitive_ABORT(asoc, NULL); sctp_primitive_ABORT(asoc, NULL);
else else
sctp_primitive_SHUTDOWN(asoc, NULL); sctp_primitive_SHUTDOWN(asoc, NULL);
} else
sctp_primitive_SHUTDOWN(asoc, NULL);
} }
/* Clean up any skbs sitting on the receive queue. */ /* Clean up any skbs sitting on the receive queue. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册