aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 88c28421ec15..c75acdf71a6f 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4978,6 +4978,10 @@ int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
4978 struct socket *sock; 4978 struct socket *sock;
4979 int err = 0; 4979 int err = 0;
4980 4980
4981 /* Do not peel off from one netns to another one. */
4982 if (!net_eq(current->nsproxy->net_ns, sock_net(sk)))
4983 return -EINVAL;
4984
4981 if (!asoc) 4985 if (!asoc)
4982 return -EINVAL; 4986 return -EINVAL;
4983 4987