Message ID | 1478364038-5519-1-git-send-email-ralph.sennhauser@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | John Crispin |
Headers | show |
Hi Ralph, thanks - applied with minor code style change in 010723e. ~ Jo
On Sat, 5 Nov 2016 17:58:49 +0100 Jo-Philipp Wich <jo@mein.io> wrote: > Hi Ralph, > > thanks - applied with minor code style change in 010723e. > > ~ Jo > Hi Jo, fixup looks good. Thanks
diff --git a/iptables.c b/iptables.c index 95fc0d4..bbd2b00 100644 --- a/iptables.c +++ b/iptables.c @@ -630,8 +630,15 @@ find_target(struct fw3_ipt_rule *r, const char *name) { struct xtables_target *t; - if (is_chain(r->h, name)) - return xtables_find_target(XT_STANDARD_TARGET, XTF_LOAD_MUST_SUCCEED); + if (is_chain(r->h, name)) { + t = xtables_find_target(XT_STANDARD_TARGET, XTF_DONT_LOAD); + if (t) { + return t; + } else { + load_extension(r->h, "standard"); + return xtables_find_target(XT_STANDARD_TARGET, XTF_LOAD_MUST_SUCCEED); + } + } t = xtables_find_target(name, XTF_DONT_LOAD);
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> --- iptables.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)