From 33d180871bea281a448efd0c1a49517318162382 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 6 Mar 2011 18:11:58 +0100 Subject: libxtables: pass struct xt_entry_{match,target} to x6 parser Signed-off-by: Jan Engelhardt --- include/xtables.h.in | 4 ++++ xtoptions.c | 2 ++ 2 files changed, 6 insertions(+) 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; } -- cgit v1.2.3