From: Jan Engelhardt Date: Sun, 6 Mar 2011 17:11:58 +0000 (+0100) Subject: libxtables: pass struct xt_entry_{match,target} to x6 parser X-Git-Tag: v1.4.11~24^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33d180871bea281a448efd0c1a49517318162382;p=thirdparty%2Fiptables.git libxtables: pass struct xt_entry_{match,target} to x6 parser Signed-off-by: Jan Engelhardt --- diff --git a/include/xtables.h.in b/include/xtables.h.in index 6167f4da..afade14b 100644 --- a/include/xtables.h.in +++ b/include/xtables.h.in @@ -126,6 +126,10 @@ struct xt_option_call { uint32_t mark, mask; }; } val; + union { + struct xt_entry_match **match; + struct xt_entry_target **target; + }; }; /** diff --git a/xtoptions.c b/xtoptions.c index 939e6860..b3acff9e 100644 --- a/xtoptions.c +++ b/xtoptions.c @@ -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; }