summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-restore.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-10-17 22:49:26 +0200
committerPhil Sutter <phil@nwl.cc>2019-10-18 11:57:31 +0200
commiteedb0bb2ad01cf1d3af6fe3d644660ab81c1fc29 (patch)
treeafb7d402bbc257d6964dad8e05b21495ede78d1a /iptables/xtables-restore.c
parent4abb44c978d75656f69dd59f24522eb970881ccf (diff)
xtables-restore: Constify struct nft_xt_restore_cb
There is no need for dynamic callback mangling, so make all instances static const. Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-restore.c')
-rw-r--r--iptables/xtables-restore.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c
index 4652d631..df884420 100644
--- a/iptables/xtables-restore.c
+++ b/iptables/xtables-restore.c
@@ -70,7 +70,7 @@ static struct nftnl_chain_list *get_chain_list(struct nft_handle *h,
return chain_list;
}
-struct nft_xt_restore_cb restore_cb = {
+static const struct nft_xt_restore_cb restore_cb = {
.chain_list = get_chain_list,
.commit = nft_commit,
.abort = nft_abort,
@@ -87,7 +87,7 @@ static const struct xtc_ops xtc_ops = {
void xtables_restore_parse(struct nft_handle *h,
const struct nft_xt_restore_parse *p,
- struct nft_xt_restore_cb *cb)
+ const struct nft_xt_restore_cb *cb)
{
const struct builtin_table *curtable = NULL;
char buffer[10240];
@@ -432,7 +432,7 @@ static int ebt_table_flush(struct nft_handle *h, const char *table)
return nft_table_flush(h, table);
}
-struct nft_xt_restore_cb ebt_restore_cb = {
+static const struct nft_xt_restore_cb ebt_restore_cb = {
.chain_list = get_chain_list,
.commit = nft_bridge_commit,
.table_new = nft_table_new,
@@ -478,7 +478,7 @@ int xtables_eb_restore_main(int argc, char *argv[])
return 0;
}
-struct nft_xt_restore_cb arp_restore_cb = {
+static const struct nft_xt_restore_cb arp_restore_cb = {
.chain_list = get_chain_list,
.commit = nft_commit,
.table_new = nft_table_new,