[NET]: Support multiple network namespaces with netlink
[platform/adaptation/renesas_rcar/renesas_kernel.git] / net / netfilter / nfnetlink.c
index c37ed01..fa974e8 100644 (file)
@@ -204,10 +204,6 @@ static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
        if (security_netlink_recv(skb, CAP_NET_ADMIN))
                return -EPERM;
 
-       /* Only requests are handled by kernel now. */
-       if (!(nlh->nlmsg_flags & NLM_F_REQUEST))
-               return 0;
-
        /* All the messages must at least contain nfgenmsg */
        if (nlh->nlmsg_len < NLMSG_SPACE(sizeof(struct nfgenmsg)))
                return 0;
@@ -268,8 +264,8 @@ static int __init nfnetlink_init(void)
 {
        printk("Netfilter messages via NETLINK v%s.\n", nfversion);
 
-       nfnl = netlink_kernel_create(NETLINK_NETFILTER, NFNLGRP_MAX,
-                                    nfnetlink_rcv, THIS_MODULE);
+       nfnl = netlink_kernel_create(&init_net, NETLINK_NETFILTER, NFNLGRP_MAX,
+                                    nfnetlink_rcv, NULL, THIS_MODULE);
        if (!nfnl) {
                printk(KERN_ERR "cannot initialize nfnetlink!\n");
                return -1;