]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: pass struct xt_entry_{match,target} to x6 parser
authorJan Engelhardt <jengelh@medozas.de>
Sun, 6 Mar 2011 17:11:58 +0000 (18:11 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Wed, 13 Apr 2011 16:09:26 +0000 (18:09 +0200)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
include/xtables.h.in
xtoptions.c

index 6167f4da3e5ec8b9fe6b4013d035702095d70e7e..afade14b8ec442b5e5853ed73ac44ea136a0c501 100644 (file)
@@ -126,6 +126,10 @@ struct xt_option_call {
                        uint32_t mark, mask;
                };
        } val;
+       union {
+               struct xt_entry_match **match;
+               struct xt_entry_target **target;
+       };
 };
 
 /**
index 939e68603e8813a90977f009448b2998ed977a7b..b3acff9e9cb9af8def86ca2bd870fa510d036fa9 100644 (file)
@@ -384,6 +384,7 @@ void xtables_option_tpcall(unsigned int c, char **argv, bool invert,
        cb.ext_name = t->name;
        cb.data     = t->t->data;
        cb.xflags   = t->tflags;
+       cb.target   = &t->t;
        t->x6_parse(&cb);
        t->tflags = cb.xflags;
 }
@@ -417,6 +418,7 @@ void xtables_option_mpcall(unsigned int c, char **argv, bool invert,
        cb.ext_name = m->name;
        cb.data     = m->m->data;
        cb.xflags   = m->mflags;
+       cb.match    = &m->m;
        m->x6_parse(&cb);
        m->mflags = cb.xflags;
 }