summaryrefslogtreecommitdiffstats
path: root/src/mnl.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-12-27 21:19:08 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-12-27 21:21:52 +0100
commitc351f337b4e5c71b3551eef1d1b936d1e56b5601 (patch)
tree8801066320447f2547bf44331778b7a40a876efe /src/mnl.c
parent8d51f169e0e832a41d2ed278be903c08bd4fa473 (diff)
src: remove deprecated code for export/import commands
Update parser to display this error message: # nft export json Error: JSON export is no longer supported, use 'nft -j list ruleset' instead export json ^^^^^^^^^^^^ Just like: # nft export vm json Error: JSON export is no longer supported, use 'nft -j list ruleset' instead export vm json ^^^^^^^^^^^^^^^ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/mnl.c')
-rw-r--r--src/mnl.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/mnl.c b/src/mnl.c
index 455e2d47..c3d16774 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -1377,66 +1377,6 @@ int mnl_nft_flowtable_del(struct netlink_ctx *ctx, const struct cmd *cmd)
}
/*
- * ruleset
- */
-struct nftnl_ruleset *mnl_nft_ruleset_dump(struct netlink_ctx *ctx,
- uint32_t family)
-{
- struct nftnl_ruleset *rs;
- struct nftnl_table_list *t;
- struct nftnl_chain_list *c;
- struct nftnl_set_list *sl;
- struct nftnl_set_list_iter *i;
- struct nftnl_set *s;
- struct nftnl_rule_list *r;
- int ret = 0;
-
- rs = nftnl_ruleset_alloc();
- if (rs == NULL)
- memory_allocation_error();
-
- t = mnl_nft_table_dump(ctx, family);
- if (t == NULL)
- goto err;
-
- nftnl_ruleset_set(rs, NFTNL_RULESET_TABLELIST, t);
-
- c = mnl_nft_chain_dump(ctx, family);
- if (c == NULL)
- goto err;
-
- nftnl_ruleset_set(rs, NFTNL_RULESET_CHAINLIST, c);
-
- sl = mnl_nft_set_dump(ctx, family, NULL);
- if (sl == NULL)
- goto err;
-
- i = nftnl_set_list_iter_create(sl);
- s = nftnl_set_list_iter_next(i);
- while (s != NULL) {
- ret = mnl_nft_setelem_get(ctx, s);
- if (ret < 0)
- goto err;
-
- s = nftnl_set_list_iter_next(i);
- }
- nftnl_set_list_iter_destroy(i);
-
- nftnl_ruleset_set(rs, NFTNL_RULESET_SETLIST, sl);
-
- r = mnl_nft_rule_dump(ctx, family);
- if (r == NULL)
- goto err;
-
- nftnl_ruleset_set(rs, NFTNL_RULESET_RULELIST, r);
-
- return rs;
-err:
- nftnl_ruleset_free(rs);
- return NULL;
-}
-
-/*
* events
*/
#define NFTABLES_NLEVENT_BUFSIZ (1 << 24)