diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-07-10 17:27:47 (GMT) |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-03-25 14:02:19 (GMT) |
commit | fd0ec0e6216baea854465bbdb177f2d1b2ccaf22 (patch) | |
tree | 47a935d96deae38aa0a030039e303b071a7803e0 /net/netfilter | |
parent | d2a7b6bad2c38e41eddb0b24d03627d9e7aa3f7b (diff) | |
download | linux-fd0ec0e6216baea854465bbdb177f2d1b2ccaf22.tar.xz |
netfilter: xtables: consolidate code into xt_request_find_match
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/x_tables.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index bf2806a..ee7fe21 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -214,6 +214,17 @@ struct xt_match *xt_find_match(u8 af, const char *name, u8 revision) } EXPORT_SYMBOL(xt_find_match); +struct xt_match * +xt_request_find_match(uint8_t nfproto, const char *name, uint8_t revision) +{ + struct xt_match *match; + + match = try_then_request_module(xt_find_match(nfproto, name, revision), + "%st_%s", xt_prefix[nfproto], name); + return (match != NULL) ? match : ERR_PTR(-ENOENT); +} +EXPORT_SYMBOL_GPL(xt_request_find_match); + /* Find target, grabs ref. Returns ERR_PTR() on error. */ struct xt_target *xt_find_target(u8 af, const char *name, u8 revision) { |