diff options
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/netfilter/ebt_log.c | 6 | ||||
-rw-r--r-- | net/bridge/netfilter/ebt_ulog.c | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c index 031bfa4a51fc..984e9c64fb80 100644 --- a/net/bridge/netfilter/ebt_log.c +++ b/net/bridge/netfilter/ebt_log.c | |||
@@ -196,10 +196,8 @@ 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 | ret = nf_log_register(PF_BRIDGE, &ebt_log_logger); | 199 | nf_log_register(PF_BRIDGE, &ebt_log_logger); |
200 | if (ret < 0 && ret != -EEXIST) | 200 | return 0; |
201 | ebt_unregister_watcher(&log); | ||
202 | return ret; | ||
203 | } | 201 | } |
204 | 202 | ||
205 | static void __exit ebt_log_fini(void) | 203 | static void __exit ebt_log_fini(void) |
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c index 9411db625917..6fec35225699 100644 --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c | |||
@@ -308,12 +308,8 @@ static int __init ebt_ulog_init(void) | |||
308 | else if ((ret = ebt_register_watcher(&ulog))) | 308 | else if ((ret = ebt_register_watcher(&ulog))) |
309 | sock_release(ebtulognl->sk_socket); | 309 | sock_release(ebtulognl->sk_socket); |
310 | 310 | ||
311 | if (nf_log_register(PF_BRIDGE, &ebt_ulog_logger) < 0) { | 311 | if (ret == 0) |
312 | printk(KERN_WARNING "ebt_ulog: not logging via ulog " | 312 | nf_log_register(PF_BRIDGE, &ebt_ulog_logger); |
313 | "since somebody else already registered for PF_BRIDGE\n"); | ||
314 | /* we cannot make module load fail here, since otherwise | ||
315 | * ebtables userspace would abort */ | ||
316 | } | ||
317 | 313 | ||
318 | return ret; | 314 | return ret; |
319 | } | 315 | } |