Commit 81a1d3c3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Patrick McHardy

net: sysctl_net - use net_eq to compare nets

Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: default avatarDaniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent acc738fe
......@@ -61,7 +61,7 @@ static struct ctl_table_root net_sysctl_root = {
static int net_ctl_ro_header_perms(struct ctl_table_root *root,
struct nsproxy *namespaces, struct ctl_table *table)
{
if (namespaces->net_ns == &init_net)
if (net_eq(namespaces->net_ns, &init_net))
return table->mode;
else
return table->mode & ~0222;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment