aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/genetlink.c
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/netlink/genetlink.c
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/netlink/genetlink.c')
-rw-r--r--net/netlink/genetlink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index fda497412fc3..c1b71aef9f71 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -918,6 +918,7 @@ static int __net_init genl_pernet_init(struct net *net)
918 struct netlink_kernel_cfg cfg = { 918 struct netlink_kernel_cfg cfg = {
919 .input = genl_rcv, 919 .input = genl_rcv,
920 .cb_mutex = &genl_mutex, 920 .cb_mutex = &genl_mutex,
921 .flags = NL_CFG_F_NONROOT_RECV,
921 }; 922 };
922 923
923 /* we'll bump the group number right afterwards */ 924 /* we'll bump the group number right afterwards */
@@ -955,8 +956,6 @@ static int __init genl_init(void)
955 if (err < 0) 956 if (err < 0)
956 goto problem; 957 goto problem;
957 958
958 netlink_set_nonroot(NETLINK_GENERIC, NL_NONROOT_RECV);
959
960 err = register_pernet_subsys(&genl_pernet_ops); 959 err = register_pernet_subsys(&genl_pernet_ops);
961 if (err) 960 if (err)
962 goto problem; 961 goto problem;