aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-09-07 22:53:53 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-08 18:45:27 -0400
commit9785e10aedfa0fad5c1aac709dce5ada1b123783 (patch)
treeca523e084318b6e908b18c6f3e9e53ea7e9a1c49 /net/core
parent16fa9e1d104e6f2c18005a4ac7ea60e4c7fc1286 (diff)
netlink: kill netlink_set_nonroot
Replace netlink_set_nonroot by one new field `flags' in struct netlink_kernel_cfg that is passed to netlink_kernel_create. This patch also renames NL_NONROOT_* to NL_CFG_F_NONROOT_* since now the flags field in nl_table is generic (so we can add more flags if needed in the future). Also adjust all callers in the net-next tree to use these flags instead of netlink_set_nonroot. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index c64efcff8078..a71806eb9cc6 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2381,6 +2381,7 @@ static int __net_init rtnetlink_net_init(struct net *net)
2381 .groups = RTNLGRP_MAX, 2381 .groups = RTNLGRP_MAX,
2382 .input = rtnetlink_rcv, 2382 .input = rtnetlink_rcv,
2383 .cb_mutex = &rtnl_mutex, 2383 .cb_mutex = &rtnl_mutex,
2384 .flags = NL_CFG_F_NONROOT_RECV,
2384 }; 2385 };
2385 2386
2386 sk = netlink_kernel_create(net, NETLINK_ROUTE, THIS_MODULE, &cfg); 2387 sk = netlink_kernel_create(net, NETLINK_ROUTE, THIS_MODULE, &cfg);
@@ -2416,7 +2417,6 @@ void __init rtnetlink_init(void)
2416 if (register_pernet_subsys(&rtnetlink_net_ops)) 2417 if (register_pernet_subsys(&rtnetlink_net_ops))
2417 panic("rtnetlink_init: cannot initialize rtnetlink\n"); 2418 panic("rtnetlink_init: cannot initialize rtnetlink\n");
2418 2419
2419 netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV);
2420 register_netdevice_notifier(&rtnetlink_dev_notifier); 2420 register_netdevice_notifier(&rtnetlink_dev_notifier);
2421 2421
2422 rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink, 2422 rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink,