Skip to content

Commit

Permalink
net: sysctl_net - use net_eq to compare nets
Browse files Browse the repository at this point in the history
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Cyrill Gorcunov authored and Patrick McHardy committed Mar 16, 2009
1 parent acc738f commit 81a1d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sysctl_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 81a1d3c

Please sign in to comment.