From 9e14d4330655a6f58bf2674f0684d8252f688c16 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 9 Mar 2016 18:18:11 +0100 Subject: 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 --- iptables/xtables-translate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'iptables/xtables-translate.c') 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; } -- cgit v1.2.3