diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-07-10 19:27:47 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-03-25 15:02:19 +0100 |
commit | fd0ec0e6216baea854465bbdb177f2d1b2ccaf22 (patch) | |
tree | 47a935d96deae38aa0a030039e303b071a7803e0 /net/ipv6/netfilter | |
parent | d2a7b6bad2c38e41eddb0b24d03627d9e7aa3f7b (diff) | |
download | linux-fd0ec0e6216baea854465bbdb177f2d1b2ccaf22.tar.gz linux-fd0ec0e6216baea854465bbdb177f2d1b2ccaf22.tar.bz2 linux-fd0ec0e6216baea854465bbdb177f2d1b2ccaf22.zip |
netfilter: xtables: consolidate code into xt_request_find_match
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/ipv6/netfilter')
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 842bef374dcc..41e2429c0163 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -660,12 +660,11 @@ find_check_match(struct ip6t_entry_match *m, struct xt_mtchk_param *par) struct xt_match *match; int ret; - match = try_then_request_module(xt_find_match(AF_INET6, m->u.user.name, - m->u.user.revision), - "ip6t_%s", m->u.user.name); - if (IS_ERR(match) || !match) { + match = xt_request_find_match(NFPROTO_IPV6, m->u.user.name, + m->u.user.revision); + if (IS_ERR(match)) { duprintf("find_check_match: `%s' not found\n", m->u.user.name); - return match ? PTR_ERR(match) : -ENOENT; + return PTR_ERR(match); } m->u.kernel.match = match; @@ -1506,13 +1505,12 @@ compat_find_calc_match(struct ip6t_entry_match *m, { struct xt_match *match; - match = try_then_request_module(xt_find_match(AF_INET6, m->u.user.name, - m->u.user.revision), - "ip6t_%s", m->u.user.name); - if (IS_ERR(match) || !match) { + match = xt_request_find_match(NFPROTO_IPV6, m->u.user.name, + m->u.user.revision); + if (IS_ERR(match)) { duprintf("compat_check_calc_match: `%s' not found\n", m->u.user.name); - return match ? PTR_ERR(match) : -ENOENT; + return PTR_ERR(match); } m->u.kernel.match = match; *size += xt_compat_match_offset(match); |