Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43b91b13 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sctp: do not peel off an assoc from one netns to another one"

parents b5d2fb05 2648ea0d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4436,6 +4436,10 @@ 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;

	if (!asoc)
		return -EINVAL;