mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
netfilter: xtables: make use of xt_request_find_target
Signed-off-by: Jan Engelhardt <[email protected]>
This commit is contained in:
parent
ff67e4e42b
commit
d2a7b6bad2
6 changed files with 29 additions and 52 deletions
|
|
@ -733,13 +733,11 @@ find_check_entry(struct ip6t_entry *e, struct net *net, const char *name,
|
|||
}
|
||||
|
||||
t = ip6t_get_target(e);
|
||||
target = try_then_request_module(xt_find_target(AF_INET6,
|
||||
t->u.user.name,
|
||||
t->u.user.revision),
|
||||
"ip6t_%s", t->u.user.name);
|
||||
if (IS_ERR(target) || !target) {
|
||||
target = xt_request_find_target(NFPROTO_IPV6, t->u.user.name,
|
||||
t->u.user.revision);
|
||||
if (IS_ERR(target)) {
|
||||
duprintf("find_check_entry: `%s' not found\n", t->u.user.name);
|
||||
ret = target ? PTR_ERR(target) : -ENOENT;
|
||||
ret = PTR_ERR(target);
|
||||
goto cleanup_matches;
|
||||
}
|
||||
t->u.kernel.target = target;
|
||||
|
|
@ -1581,14 +1579,12 @@ check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e,
|
|||
}
|
||||
|
||||
t = compat_ip6t_get_target(e);
|
||||
target = try_then_request_module(xt_find_target(AF_INET6,
|
||||
t->u.user.name,
|
||||
t->u.user.revision),
|
||||
"ip6t_%s", t->u.user.name);
|
||||
if (IS_ERR(target) || !target) {
|
||||
target = xt_request_find_target(NFPROTO_IPV6, t->u.user.name,
|
||||
t->u.user.revision);
|
||||
if (IS_ERR(target)) {
|
||||
duprintf("check_compat_entry_size_and_hooks: `%s' not found\n",
|
||||
t->u.user.name);
|
||||
ret = target ? PTR_ERR(target) : -ENOENT;
|
||||
ret = PTR_ERR(target);
|
||||
goto release_matches;
|
||||
}
|
||||
t->u.kernel.target = target;
|
||||
|
|
|
|||
Loading…
Reference in a new issue