summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-07-24 12:54:27 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-07-25 17:27:58 +0200
commit70f39ea15ef725bfb6126da6a493c73f5f387df2 (patch)
treea9cfe672a85148dbf801ffa72060631937ae376d /src
parent4682e6f350b30dd0beb8cbd09ebf3260f814cbf2 (diff)
xt: use struct xt_xlate_{mt,tg}_params
Adapt this code to the new interface that introduces struct xt_xlate_{mt,tg}_params. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/xt.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/xt.c b/src/xt.c
index afcc8362..0777d9c4 100644
--- a/src/xt.c
+++ b/src/xt.c
@@ -35,9 +35,14 @@ void xt_stmt_xlate(const struct stmt *stmt)
if (stmt->xt.match == NULL && stmt->xt.opts) {
printf("%s", stmt->xt.opts);
} else if (stmt->xt.match->xlate) {
- stmt->xt.match->xlate(stmt->xt.entry,
- stmt->xt.match->m, xl, 0);
- printf("%s", xt_xlate_get(xl));
+ struct xt_xlate_mt_params params = {
+ .ip = stmt->xt.entry,
+ .match = stmt->xt.match->m,
+ .numeric = 0,
+ };
+
+ stmt->xt.match->xlate(xl, &params);
+ printf("%s", xt_xlate_get(xl));
} else if (stmt->xt.match->print) {
printf("#");
stmt->xt.match->print(&stmt->xt.entry,
@@ -49,8 +54,13 @@ void xt_stmt_xlate(const struct stmt *stmt)
if (stmt->xt.target == NULL && stmt->xt.opts) {
printf("%s", stmt->xt.opts);
} else if (stmt->xt.target->xlate) {
- stmt->xt.target->xlate(stmt->xt.entry,
- stmt->xt.target->t, xl, 0);
+ struct xt_xlate_tg_params params = {
+ .ip = stmt->xt.entry,
+ .target = stmt->xt.target->t,
+ .numeric = 0,
+ };
+
+ stmt->xt.target->xlate(xl, &params);
printf("%s", xt_xlate_get(xl));
} else if (stmt->xt.target->print) {
printf("#");