diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-03-09 18:18:11 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-03-09 18:21:35 +0100 |
commit | 9e14d4330655a6f58bf2674f0684d8252f688c16 (patch) | |
tree | f3520dce62fcf042c303d796ddf53aa6267c5b18 /iptables/xtables-translate.c | |
parent | fcc183744956780cb88dca4d242b9a0f243434e4 (diff) |
iptables-translate: pass ipt_entry and ip6t_entry to ->xlate()
The multiport match needs it, this basically leaves ->xlate() indirection
with almost the same interface as ->print().
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-translate.c')
-rw-r--r-- | iptables/xtables-translate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c index 3c5b5775..13a0bc71 100644 --- a/iptables/xtables-translate.c +++ b/iptables/xtables-translate.c @@ -49,7 +49,8 @@ int xlate_action(const struct iptables_command_state *cs, bool goto_set, else if (strcmp(cs->jumpto, XTC_LABEL_RETURN) == 0) xt_xlate_add(xl, "return"); else if (cs->target->xlate) - ret = cs->target->xlate(cs->target->t, xl, numeric); + ret = cs->target->xlate((const void *)&cs->fw, + cs->target->t, xl, numeric); else return 0; } else if (strlen(cs->jumpto) > 0) { @@ -72,7 +73,8 @@ int xlate_matches(const struct iptables_command_state *cs, struct xt_xlate *xl) if (!matchp->match->xlate) return 0; - ret = matchp->match->xlate(matchp->match->m, xl, numeric); + ret = matchp->match->xlate((const void *)&cs->fw, + matchp->match->m, xl, numeric); if (!ret) break; } |