aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-24 15:29:55 -0700
committerDavid S. Miller <davem@davemloft.net>2007-07-24 15:29:55 -0700
commit7e2acc7e2711d51705373ac201333c9a0ebd3950 (patch)
tree06bd3d776970a2e09bfca5c67dad4490fd1ea7c0 /net/ipv6
parent[TCPv6] MD5SIG: Ensure to reset allocation count to avoid panic. (diff)
downloadlinux-dev-7e2acc7e2711d51705373ac201333c9a0ebd3950.tar.xz
linux-dev-7e2acc7e2711d51705373ac201333c9a0ebd3950.zip
[NETFILTER]: Fix logging regression
Loading one of the LOG target fails if a different target has already registered itself as backend for the same family. This can affect the ipt_LOG and ipt_ULOG modules when both are loaded. Reported and tested by: <t.artem@mailcity.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6t_LOG.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index b05327ebd332..6ab99001dccc 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -493,10 +493,8 @@ static int __init ip6t_log_init(void)
ret = xt_register_target(&ip6t_log_reg);
if (ret < 0)
return ret;
- ret = nf_log_register(PF_INET6, &ip6t_logger);
- if (ret < 0 && ret != -EEXIST)
- xt_unregister_target(&ip6t_log_reg);
- return ret;
+ nf_log_register(PF_INET6, &ip6t_logger);
+ return 0;
}
static void __exit ip6t_log_fini(void)