Commit 3b5018d6 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fe6092ea
...@@ -196,14 +196,10 @@ static int __init ebt_log_init(void) ...@@ -196,14 +196,10 @@ static int __init ebt_log_init(void)
ret = ebt_register_watcher(&log); ret = ebt_register_watcher(&log);
if (ret < 0) if (ret < 0)
return ret; return ret;
if (nf_log_register(PF_BRIDGE, &ebt_log_logger) < 0) { ret = nf_log_register(PF_BRIDGE, &ebt_log_logger);
printk(KERN_WARNING "ebt_log: not logging via system console " if (ret < 0 && ret != -EEXIST)
"since somebody else already registered for PF_INET\n"); ebt_unregister_watcher(&log);
/* we cannot make module load fail here, since otherwise return ret;
* ebtables userspace would abort */
}
return 0;
} }
static void __exit ebt_log_fini(void) static void __exit ebt_log_fini(void)
......
...@@ -477,14 +477,10 @@ static int __init ipt_log_init(void) ...@@ -477,14 +477,10 @@ static int __init ipt_log_init(void)
ret = xt_register_target(&ipt_log_reg); ret = xt_register_target(&ipt_log_reg);
if (ret < 0) if (ret < 0)
return ret; return ret;
if (nf_log_register(PF_INET, &ipt_log_logger) < 0) { ret = nf_log_register(PF_INET, &ipt_log_logger);
printk(KERN_WARNING "ipt_LOG: not logging via system console " if (ret < 0 && ret != -EEXIST)
"since somebody else already registered for PF_INET\n"); xt_unregister_target(&ipt_log_reg);
/* we cannot make module load fail here, since otherwise return ret;
* iptables userspace would abort */
}
return 0;
} }
static void __exit ipt_log_fini(void) static void __exit ipt_log_fini(void)
......
...@@ -490,14 +490,10 @@ static int __init ip6t_log_init(void) ...@@ -490,14 +490,10 @@ static int __init ip6t_log_init(void)
ret = xt_register_target(&ip6t_log_reg); ret = xt_register_target(&ip6t_log_reg);
if (ret < 0) if (ret < 0)
return ret; return ret;
if (nf_log_register(PF_INET6, &ip6t_logger) < 0) { ret = nf_log_register(PF_INET6, &ip6t_logger);
printk(KERN_WARNING "ip6t_LOG: not logging via system console " if (ret < 0 && ret != -EEXIST)
"since somebody else already registered for PF_INET6\n"); xt_unregister_target(&ip6t_log_reg);
/* we cannot make module load fail here, since otherwise return ret;
* ip6tables userspace would abort */
}
return 0;
} }
static void __exit ip6t_log_fini(void) static void __exit ip6t_log_fini(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment