]> 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 45712aec6a0ee28c07746bfeaf157c725695bb98..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,13 +196,7 @@ static int __init ebt_log_init(void)
        ret = ebt_register_watcher(&log);
        if (ret < 0)
                return ret;
-       if (nf_log_register(PF_BRIDGE, &ebt_log_logger) < 0) {
-               printk(KERN_WARNING "ebt_log: not logging via system console "
-                      "since somebody else already registered for PF_INET\n");
-               /* we cannot make module load fail here, since otherwise
-                * ebtables userspace would abort */
-       }
-
+       nf_log_register(PF_BRIDGE, &ebt_log_logger);
        return 0;
 }