This should happen in ebtables-restore only: If a previous rule
contained a standard target, the standard target object is inserted into
xtables_targets. Though since that doesn't have a 'parse' callback, the
code segfaults. Therefore make the code ignore that special object
(which is not an issue since standard targets don't support parameters).

Signed-off-by: Phil Sutter <[email protected]>
---
 iptables/xtables-eb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 06ca5daa20541..c05adb92a7be2 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -1222,6 +1222,9 @@ print_zero:
 
                        /* Is it a watcher option? */
                        for (w = xtables_targets; w; w = w->next) {
+                               if (!strcmp(w->name, "standard"))
+                                       continue;
+
                                if (w->parse(c - w->option_offset, argv,
                                             ebt_invert, &w->tflags,
                                             NULL, &w->t)) {
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to