diff options
author | Ralph Sennhauser <ralph.sennhauser@gmail.com> | 2016-11-05 17:40:38 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-11-05 17:56:14 +0100 |
commit | 010723ef8af18add1e592a55092d4b0e1c5e1efe (patch) | |
tree | 55c4364b65357c4c88772757580b7167d0c3ecda | |
parent | dd013720b42d6df91176dc9e87f815dcd5d69519 (diff) | |
download | firewall3-010723ef8af18add1e592a55092d4b0e1c5e1efe.tar.gz |
iptables: fix loading standard target
In case iptables is built with --disable-static xt_standard needs to be
loaded just like the other extensions.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
[Jo-Philipp Wich: minor code style change to if/return instead of if/else]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | iptables.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -630,8 +630,15 @@ find_target(struct fw3_ipt_rule *r, const char *name) { struct xtables_target *t; - if (is_chain(r->h, name)) + if (is_chain(r->h, name)) { + t = xtables_find_target(XT_STANDARD_TARGET, XTF_DONT_LOAD); + + if (t) + return t; + + load_extension(r->h, "standard"); return xtables_find_target(XT_STANDARD_TARGET, XTF_LOAD_MUST_SUCCEED); + } t = xtables_find_target(name, XTF_DONT_LOAD); |