]> err.no Git - linux-2.6/blobdiff - net/bridge/netfilter/ebt_log.c
[NETNS]: Consolidate kernel netlink socket destruction.
[linux-2.6] / net / bridge / netfilter / ebt_log.c
index 031bfa4a51fc0c8a25d7d7f92810183f577cbaea..3be9e9898553b1d129700929dac0177853c0b377 100644 (file)
@@ -9,7 +9,6 @@
  *
  */
 
-#include <linux/in.h>
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_log.h>
 #include <linux/netfilter.h>
@@ -18,6 +17,7 @@
 #include <linux/in.h>
 #include <linux/if_arp.h>
 #include <linux/spinlock.h>
+#include <net/netfilter/nf_log.h>
 
 static DEFINE_SPINLOCK(ebt_log_lock);
 
@@ -183,7 +183,7 @@ static struct ebt_watcher log =
        .me             = THIS_MODULE,
 };
 
-static struct nf_logger ebt_log_logger = {
+static const struct nf_logger ebt_log_logger = {
        .name           = "ebt_log",
        .logfn          = &ebt_log_packet,
        .me             = THIS_MODULE,
@@ -196,10 +196,8 @@ static int __init ebt_log_init(void)
        ret = ebt_register_watcher(&log);
        if (ret < 0)
                return ret;
-       ret = nf_log_register(PF_BRIDGE, &ebt_log_logger);
-       if (ret < 0 && ret != -EEXIST)
-               ebt_unregister_watcher(&log);
-       return ret;
+       nf_log_register(PF_BRIDGE, &ebt_log_logger);
+       return 0;
 }
 
 static void __exit ebt_log_fini(void)