Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b5018d6766186474366f26cc87fba81407b9089
Commit:     3b5018d6766186474366f26cc87fba81407b9089
Parent:     fe6092ea0019cbba5263a915c9ce9f2bf383209e
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 12 22:16:18 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:29:00 2007 -0700

    [NETFILTER]: {eb,ip6,ip}t_LOG: remove remains of LOG target overloading
    
    All LOG targets always use their internal logging function nowadays, so
    remove the incorrect error message and handle real errors (!= -EEXIST)
    by failing to load.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/bridge/netfilter/ebt_log.c |   12 ++++--------
 net/ipv4/netfilter/ipt_LOG.c   |   12 ++++--------
 net/ipv6/netfilter/ip6t_LOG.c  |   12 ++++--------
 3 files changed, 12 insertions(+), 24 deletions(-)

diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 45712ae..031bfa4 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -196,14 +196,10 @@ 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 */
-       }
-
-       return 0;
+       ret = nf_log_register(PF_BRIDGE, &ebt_log_logger);
+       if (ret < 0 && ret != -EEXIST)
+               ebt_unregister_watcher(&log);
+       return ret;
 }
 
 static void __exit ebt_log_fini(void)
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 2fa3661..a42c5cd 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -477,14 +477,10 @@ static int __init ipt_log_init(void)
        ret = xt_register_target(&ipt_log_reg);
        if (ret < 0)
                return ret;
-       if (nf_log_register(PF_INET, &ipt_log_logger) < 0) {
-               printk(KERN_WARNING "ipt_LOG: not logging via system console "
-                      "since somebody else already registered for PF_INET\n");
-               /* we cannot make module load fail here, since otherwise
-                * iptables userspace would abort */
-       }
-
-       return 0;
+       ret = nf_log_register(PF_INET, &ipt_log_logger);
+       if (ret < 0 && ret != -EEXIST)
+               xt_unregister_target(&ipt_log_reg);
+       return ret;
 }
 
 static void __exit ipt_log_fini(void)
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index b465e24..5bb9cd3 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -490,14 +490,10 @@ static int __init ip6t_log_init(void)
        ret = xt_register_target(&ip6t_log_reg);
        if (ret < 0)
                return ret;
-       if (nf_log_register(PF_INET6, &ip6t_logger) < 0) {
-               printk(KERN_WARNING "ip6t_LOG: not logging via system console "
-                      "since somebody else already registered for PF_INET6\n");
-               /* we cannot make module load fail here, since otherwise
-                * ip6tables userspace would abort */
-       }
-
-       return 0;
+       ret = nf_log_register(PF_INET6, &ip6t_logger);
+       if (ret < 0 && ret != -EEXIST)
+               xt_unregister_target(&ip6t_log_reg);
+       return ret;
 }
 
 static void __exit ip6t_log_fini(void)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to