From: Greg Kroah-Hartman Date: Tue, 28 Nov 2017 11:29:45 +0000 (+0100) Subject: Revert "sctp: do not peel off an assoc from one netns to another one" X-Git-Tag: v4.4.103~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d7214a338d72a66739e83b32fe6e78688051ecc;p=thirdparty%2Fkernel%2Fstable.git Revert "sctp: do not peel off an assoc from one netns to another one" This reverts commit 2a0e60907e54dad75e9b3568d02bec11d6e74f6b which is commit df80cd9b28b9ebaa284a41df611dbf3a2d05ca74 upstream as I messed up by applying it to the tree twice. Reported-by: Michal Kubecek Cc: ChunYu Wang Cc: Xin Long Cc: Marcelo Ricardo Leitner Cc: Neil Horman Cc: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 272edd7748a0b..7f0f689b8d2b1 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4453,10 +4453,6 @@ int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) struct socket *sock; int err = 0; - /* Do not peel off from one netns to another one. */ - if (!net_eq(current->nsproxy->net_ns, sock_net(sk))) - return -EINVAL; - /* Do not peel off from one netns to another one. */ if (!net_eq(current->nsproxy->net_ns, sock_net(sk))) return -EINVAL;