]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables-restore: Drop chain_list callback
authorPhil Sutter <phil@nwl.cc>
Thu, 17 Oct 2019 22:09:01 +0000 (00:09 +0200)
committerPhil Sutter <phil@nwl.cc>
Fri, 18 Oct 2019 09:57:49 +0000 (11:57 +0200)
Since commit 0baa08fed43fa ("xtables: unify user chain add/flush for
restore case") it is not used anymore, so just drop it.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft-shared.h
iptables/xtables-restore.c

index b062f3e5792e37b58e17bad62c6de1e75dba0e98..8b073b18fb0d9c97672d9319e96a07f8ebabbdd8 100644 (file)
@@ -243,8 +243,6 @@ struct nftnl_chain_list;
 
 struct nft_xt_restore_cb {
        void (*table_new)(struct nft_handle *h, const char *table);
-       struct nftnl_chain_list *(*chain_list)(struct nft_handle *h,
-                                              const char *table);
        int (*chain_set)(struct nft_handle *h, const char *table,
                         const char *chain, const char *policy,
                         const struct xt_counters *counters);
index eb5eaa29bb0e84aa3c9921c88b4c08cc2b329757..1c7d5da52df64fe36bc79c30574f8287bfbc91e6 100644 (file)
@@ -58,20 +58,7 @@ static void print_usage(const char *name, const char *version)
                        "          [ --ipv6 ]\n", name);
 }
 
-static struct nftnl_chain_list *get_chain_list(struct nft_handle *h,
-                                              const char *table)
-{
-       struct nftnl_chain_list *chain_list;
-
-       chain_list = nft_chain_list_get(h, table, NULL);
-       if (chain_list == NULL)
-               xtables_error(OTHER_PROBLEM, "cannot retrieve chain list\n");
-
-       return chain_list;
-}
-
 static const struct nft_xt_restore_cb restore_cb = {
-       .chain_list     = get_chain_list,
        .commit         = nft_commit,
        .abort          = nft_abort,
        .table_new      = nft_table_new,
@@ -428,7 +415,6 @@ static int ebt_table_flush(struct nft_handle *h, const char *table)
 }
 
 static const struct nft_xt_restore_cb ebt_restore_cb = {
-       .chain_list     = get_chain_list,
        .commit         = nft_bridge_commit,
        .table_new      = nft_table_new,
        .table_flush    = ebt_table_flush,
@@ -474,7 +460,6 @@ int xtables_eb_restore_main(int argc, char *argv[])
 }
 
 static const struct nft_xt_restore_cb arp_restore_cb = {
-       .chain_list     = get_chain_list,
        .commit         = nft_commit,
        .table_new      = nft_table_new,
        .table_flush    = nft_table_flush,