[NETFILTER]: nf_log: move logging stuff to seperate header
[deliverable/linux.git] / net / bridge / netfilter / ebt_ulog.c
index 9411db62591754b5592a783040e48763ddc92514..1b9ca07f44ffbabbb7a7dc3238b007397e4fcd9d 100644 (file)
@@ -36,9 +36,9 @@
 #include <linux/timer.h>
 #include <linux/netlink.h>
 #include <linux/netdevice.h>
-#include <linux/module.h>
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_ulog.h>
+#include <net/netfilter/nf_log.h>
 #include <net/sock.h>
 #include "../br_private.h"
 
@@ -301,19 +301,16 @@ static int __init ebt_ulog_init(void)
                spin_lock_init(&ulog_buffers[i].lock);
        }
 
-       ebtulognl = netlink_kernel_create(NETLINK_NFLOG, EBT_ULOG_MAXNLGROUPS,
-                                         NULL, NULL, THIS_MODULE);
+       ebtulognl = netlink_kernel_create(&init_net, NETLINK_NFLOG,
+                                         EBT_ULOG_MAXNLGROUPS, NULL, NULL,
+                                         THIS_MODULE);
        if (!ebtulognl)
                ret = -ENOMEM;
        else if ((ret = ebt_register_watcher(&ulog)))
                sock_release(ebtulognl->sk_socket);
 
-       if (nf_log_register(PF_BRIDGE, &ebt_ulog_logger) < 0) {
-               printk(KERN_WARNING "ebt_ulog: not logging via ulog "
-                      "since somebody else already registered for PF_BRIDGE\n");
-               /* we cannot make module load fail here, since otherwise
-                * ebtables userspace would abort */
-       }
+       if (ret == 0)
+               nf_log_register(PF_BRIDGE, &ebt_ulog_logger);
 
        return ret;
 }
This page took 0.025592 seconds and 5 git commands to generate.