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>
{
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);