aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-07-10 12:55:11 -0400
committerJan Engelhardt <jengelh@medozas.de>2010-03-25 10:02:19 -0400
commitd2a7b6bad2c38e41eddb0b24d03627d9e7aa3f7b (patch)
tree826eb9d112029819aa44925346a55f887b1c3baf /net/bridge
parentff67e4e42bd178b1179c4d8e5c1fde18758ce84f (diff)
netfilter: xtables: make use of xt_request_find_target
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/netfilter/ebtables.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 989d72cc8148..6d3b256d2f61 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -395,13 +395,9 @@ ebt_check_watcher(struct ebt_entry_watcher *w, struct xt_tgchk_param *par,
395 left - sizeof(struct ebt_entry_watcher) < w->watcher_size) 395 left - sizeof(struct ebt_entry_watcher) < w->watcher_size)
396 return -EINVAL; 396 return -EINVAL;
397 397
398 watcher = try_then_request_module( 398 watcher = xt_request_find_target(NFPROTO_BRIDGE, w->u.name, 0);
399 xt_find_target(NFPROTO_BRIDGE, w->u.name, 0),
400 "ebt_%s", w->u.name);
401 if (IS_ERR(watcher)) 399 if (IS_ERR(watcher))
402 return PTR_ERR(watcher); 400 return PTR_ERR(watcher);
403 if (watcher == NULL)
404 return -ENOENT;
405 w->u.watcher = watcher; 401 w->u.watcher = watcher;
406 402
407 par->target = watcher; 403 par->target = watcher;
@@ -714,15 +710,10 @@ ebt_check_entry(struct ebt_entry *e, struct net *net,
714 t = (struct ebt_entry_target *)(((char *)e) + e->target_offset); 710 t = (struct ebt_entry_target *)(((char *)e) + e->target_offset);
715 gap = e->next_offset - e->target_offset; 711 gap = e->next_offset - e->target_offset;
716 712
717 target = try_then_request_module( 713 target = xt_request_find_target(NFPROTO_BRIDGE, t->u.name, 0);
718 xt_find_target(NFPROTO_BRIDGE, t->u.name, 0),
719 "ebt_%s", t->u.name);
720 if (IS_ERR(target)) { 714 if (IS_ERR(target)) {
721 ret = PTR_ERR(target); 715 ret = PTR_ERR(target);
722 goto cleanup_watchers; 716 goto cleanup_watchers;
723 } else if (target == NULL) {
724 ret = -ENOENT;
725 goto cleanup_watchers;
726 } 717 }
727 718
728 t->u.target = target; 719 t->u.target = target;