diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6t_LOG.c | 12 |
1 files changed, 4 insertions, 8 deletions
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) |