diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-07-10 13:27:47 -0400 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-03-25 10:02:19 -0400 |
commit | fd0ec0e6216baea854465bbdb177f2d1b2ccaf22 (patch) | |
tree | 47a935d96deae38aa0a030039e303b071a7803e0 /net/ipv6 | |
parent | d2a7b6bad2c38e41eddb0b24d03627d9e7aa3f7b (diff) |
netfilter: xtables: consolidate code into xt_request_find_match
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/ipv6')
-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) | |||
660 | struct xt_match *match; | 660 | struct xt_match *match; |
661 | int ret; | 661 | int ret; |
662 | 662 | ||
663 | match = try_then_request_module(xt_find_match(AF_INET6, m->u.user.name, | 663 | match = xt_request_find_match(NFPROTO_IPV6, m->u.user.name, |
664 | m->u.user.revision), | 664 | m->u.user.revision); |
665 | "ip6t_%s", m->u.user.name); | 665 | if (IS_ERR(match)) { |
666 | if (IS_ERR(match) || !match) { | ||
667 | duprintf("find_check_match: `%s' not found\n", m->u.user.name); | 666 | duprintf("find_check_match: `%s' not found\n", m->u.user.name); |
668 | return match ? PTR_ERR(match) : -ENOENT; | 667 | return PTR_ERR(match); |
669 | } | 668 | } |
670 | m->u.kernel.match = match; | 669 | m->u.kernel.match = match; |
671 | 670 | ||
@@ -1506,13 +1505,12 @@ compat_find_calc_match(struct ip6t_entry_match *m, | |||
1506 | { | 1505 | { |
1507 | struct xt_match *match; | 1506 | struct xt_match *match; |
1508 | 1507 | ||
1509 | match = try_then_request_module(xt_find_match(AF_INET6, m->u.user.name, | 1508 | match = xt_request_find_match(NFPROTO_IPV6, m->u.user.name, |
1510 | m->u.user.revision), | 1509 | m->u.user.revision); |
1511 | "ip6t_%s", m->u.user.name); | 1510 | if (IS_ERR(match)) { |
1512 | if (IS_ERR(match) || !match) { | ||
1513 | duprintf("compat_check_calc_match: `%s' not found\n", | 1511 | duprintf("compat_check_calc_match: `%s' not found\n", |
1514 | m->u.user.name); | 1512 | m->u.user.name); |
1515 | return match ? PTR_ERR(match) : -ENOENT; | 1513 | return PTR_ERR(match); |
1516 | } | 1514 | } |
1517 | m->u.kernel.match = match; | 1515 | m->u.kernel.match = match; |
1518 | *size += xt_compat_match_offset(match); | 1516 | *size += xt_compat_match_offset(match); |