aboutsummaryrefslogtreecommitdiff
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-02-05 19:28:22 +0000
committerMark Brown <broonie@kernel.org>2016-02-05 19:28:22 +0000
commitcd6f5814252060db2d38f57c602db33696c549c0 (patch)
tree0bcf23a07f1316cb57f0127e5b1622fea59c3e8e /net/sctp/socket.c
parentd235b7b42ab59e2e616082a0735b3bcc76685c7b (diff)
parente14ca734b547e3187713441909897aefdf4e4016 (diff)
Merge tag 'v3.10.96' into linux-linaro-lsk-v3.10lsk-v3.10-16.02
This is the 3.10.96 stable release
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index ec5766dc3946..bdc3fb66717d 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1533,8 +1533,7 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout)
struct sctp_chunk *chunk;
chunk = sctp_make_abort_user(asoc, NULL, 0);
- if (chunk)
- sctp_primitive_ABORT(net, asoc, chunk);
+ sctp_primitive_ABORT(net, asoc, chunk);
} else
sctp_primitive_SHUTDOWN(net, asoc, NULL);
}
@@ -6969,6 +6968,9 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk,
newinet->mc_ttl = 1;
newinet->mc_index = 0;
newinet->mc_list = NULL;
+
+ if (newsk->sk_flags & SK_FLAGS_TIMESTAMP)
+ net_enable_timestamp();
}
static inline void sctp_copy_descendant(struct sock *sk_to,
@@ -7149,6 +7151,13 @@ struct proto sctp_prot = {
#if IS_ENABLED(CONFIG_IPV6)
+#include <net/transp_v6.h>
+static void sctp_v6_destroy_sock(struct sock *sk)
+{
+ sctp_destroy_sock(sk);
+ inet6_destroy_sock(sk);
+}
+
struct proto sctpv6_prot = {
.name = "SCTPv6",
.owner = THIS_MODULE,
@@ -7158,7 +7167,7 @@ struct proto sctpv6_prot = {
.accept = sctp_accept,
.ioctl = sctp_ioctl,
.init = sctp_init_sock,
- .destroy = sctp_destroy_sock,
+ .destroy = sctp_v6_destroy_sock,
.shutdown = sctp_shutdown,
.setsockopt = sctp_setsockopt,
.getsockopt = sctp_getsockopt,