genetlink.c (7b0cfee1a24efdfe0235bac62e53f686fe8a8e24) genetlink.c (a31f2d17b331db970259e875b7223d3aba7e3821)
1/*
2 * NETLINK Generic Netlink Family
3 *
4 * Authors: Jamal Hadi Salim
5 * Thomas Graf <tgraf@suug.ch>
6 * Johannes Berg <johannes@sipsolutions.net>
7 */
8

--- 901 unchanged lines hidden (view full) ---

910};
911
912static struct genl_multicast_group notify_grp = {
913 .name = "notify",
914};
915
916static int __net_init genl_pernet_init(struct net *net)
917{
1/*
2 * NETLINK Generic Netlink Family
3 *
4 * Authors: Jamal Hadi Salim
5 * Thomas Graf <tgraf@suug.ch>
6 * Johannes Berg <johannes@sipsolutions.net>
7 */
8

--- 901 unchanged lines hidden (view full) ---

910};
911
912static struct genl_multicast_group notify_grp = {
913 .name = "notify",
914};
915
916static int __net_init genl_pernet_init(struct net *net)
917{
918 struct netlink_kernel_cfg cfg = {
919 .input = genl_rcv,
920 .cb_mutex = &genl_mutex,
921 };
922
918 /* we'll bump the group number right afterwards */
923 /* we'll bump the group number right afterwards */
919 net->genl_sock = netlink_kernel_create(net, NETLINK_GENERIC, 0,
920 genl_rcv, &genl_mutex,
921 THIS_MODULE);
924 net->genl_sock = netlink_kernel_create(net, NETLINK_GENERIC,
925 THIS_MODULE, &cfg);
922
923 if (!net->genl_sock && net_eq(net, &init_net))
924 panic("GENL: Cannot initialize generic netlink\n");
925
926 if (!net->genl_sock)
927 return -ENOMEM;
928
929 return 0;

--- 90 unchanged lines hidden ---
926
927 if (!net->genl_sock && net_eq(net, &init_net))
928 panic("GENL: Cannot initialize generic netlink\n");
929
930 if (!net->genl_sock)
931 return -ENOMEM;
932
933 return 0;

--- 90 unchanged lines hidden ---