summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-translate.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-10-17 22:26:50 +0200
committerPhil Sutter <phil@nwl.cc>2019-11-06 13:41:32 +0100
commit3c0e4590ffbca3b0153eaff3338b331de2fe737c (patch)
tree4ef5ba28f7fd33e2b66f5d36c00f5b6eb2f12eaa /iptables/xtables-translate.c
parent49d95c9002218645da157abdb91fd20c176b1c56 (diff)
xtables-restore: Integrate restore callbacks into struct nft_xt_restore_parse
There's really no point in passing those as separate parameter. While being at it, make them static const everywhere. Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-translate.c')
-rw-r--r--iptables/xtables-translate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c
index 43607901..a42c60a3 100644
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -498,7 +498,9 @@ static int xtables_restore_xlate_main(int family, const char *progname,
.family = family,
};
const char *file = NULL;
- struct nft_xt_restore_parse p = {};
+ struct nft_xt_restore_parse p = {
+ .cb = &cb_xlate,
+ };
time_t now = time(NULL);
int c;
@@ -535,7 +537,7 @@ static int xtables_restore_xlate_main(int family, const char *progname,
printf("# Translated by %s v%s on %s",
argv[0], PACKAGE_VERSION, ctime(&now));
- xtables_restore_parse(&h, &p, &cb_xlate);
+ xtables_restore_parse(&h, &p);
printf("# Completed on %s", ctime(&now));
nft_fini(&h);