mirror of https://github.com/OpenIPC/firmware.git
15 lines
477 B
Diff
15 lines
477 B
Diff
diff -drupN a/net/sctp/socket.c b/net/sctp/socket.c
|
|
--- a/net/sctp/socket.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/net/sctp/socket.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -4785,6 +4785,10 @@ int sctp_do_peeloff(struct sock *sk, sct
|
|
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;
|
|
+
|
|
if (!asoc)
|
|
return -EINVAL;
|
|
|