diff options
author | Patrick McHardy <kaber@trash.net> | 2007-04-13 01:16:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:29:00 -0400 |
commit | 3b5018d6766186474366f26cc87fba81407b9089 (patch) | |
tree | a759e0146445c00441ca39a1ba50fd8e75526249 /net | |
parent | fe6092ea0019cbba5263a915c9ce9f2bf383209e (diff) |
[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 <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/netfilter/ebt_log.c | 12 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_LOG.c | 12 | ||||
-rw-r--r-- | 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 45712aec6a0e..031bfa4a51fc 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) | |||
196 | ret = ebt_register_watcher(&log); | 196 | ret = ebt_register_watcher(&log); |
197 | if (ret < 0) | 197 | if (ret < 0) |
198 | return ret; | 198 | return ret; |
199 | if (nf_log_register(PF_BRIDGE, &ebt_log_logger) < 0) { | 199 | ret = nf_log_register(PF_BRIDGE, &ebt_log_logger); |
200 | printk(KERN_WARNING "ebt_log: not logging via system console " | 200 | if (ret < 0 && ret != -EEXIST) |
201 | "since somebody else already registered for PF_INET\n"); | 201 | ebt_unregister_watcher(&log); |
202 | /* we cannot make module load fail here, since otherwise | 202 | return ret; |
203 | * ebtables userspace would abort */ | ||
204 | } | ||
205 | |||
206 | return 0; | ||
207 | } | 203 | } |
208 | 204 | ||
209 | static void __exit ebt_log_fini(void) | 205 | static void __exit ebt_log_fini(void) |
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c index 2fa36618c517..a42c5cd968b1 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) | |||
477 | ret = xt_register_target(&ipt_log_reg); | 477 | ret = xt_register_target(&ipt_log_reg); |
478 | if (ret < 0) | 478 | if (ret < 0) |
479 | return ret; | 479 | return ret; |
480 | if (nf_log_register(PF_INET, &ipt_log_logger) < 0) { | 480 | ret = nf_log_register(PF_INET, &ipt_log_logger); |
481 | printk(KERN_WARNING "ipt_LOG: not logging via system console " | 481 | if (ret < 0 && ret != -EEXIST) |
482 | "since somebody else already registered for PF_INET\n"); | 482 | xt_unregister_target(&ipt_log_reg); |
483 | /* we cannot make module load fail here, since otherwise | 483 | return ret; |
484 | * iptables userspace would abort */ | ||
485 | } | ||
486 | |||
487 | return 0; | ||
488 | } | 484 | } |
489 | 485 | ||
490 | static void __exit ipt_log_fini(void) | 486 | static void __exit ipt_log_fini(void) |
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index b465e24e90b3..5bb9cd349350 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) | |||
490 | ret = xt_register_target(&ip6t_log_reg); | 490 | ret = xt_register_target(&ip6t_log_reg); |
491 | if (ret < 0) | 491 | if (ret < 0) |
492 | return ret; | 492 | return ret; |
493 | if (nf_log_register(PF_INET6, &ip6t_logger) < 0) { | 493 | ret = nf_log_register(PF_INET6, &ip6t_logger); |
494 | printk(KERN_WARNING "ip6t_LOG: not logging via system console " | 494 | if (ret < 0 && ret != -EEXIST) |
495 | "since somebody else already registered for PF_INET6\n"); | 495 | xt_unregister_target(&ip6t_log_reg); |
496 | /* we cannot make module load fail here, since otherwise | 496 | return ret; |
497 | * ip6tables userspace would abort */ | ||
498 | } | ||
499 | |||
500 | return 0; | ||
501 | } | 497 | } |
502 | 498 | ||
503 | static void __exit ip6t_log_fini(void) | 499 | static void __exit ip6t_log_fini(void) |