summaryrefslogtreecommitdiffstats
path: root/src/libnftables.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-10-22 21:18:19 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-22 21:45:37 +0200
commit2dc07bcd7eaa56369dff01b596acf010308007d3 (patch)
treeaee032b5f320cd8c58fd3641e994431705310b81 /src/libnftables.c
parent00f777bfc414af1e1384a213adc91ae4ecf6cbdf (diff)
src: pass struct nft_ctx through struct netlink_ctx
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/libnftables.c')
-rw-r--r--src/libnftables.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libnftables.c b/src/libnftables.c
index 97776379..44869602 100644
--- a/src/libnftables.c
+++ b/src/libnftables.c
@@ -40,10 +40,7 @@ static int nft_netlink(struct nft_ctx *nft,
ctx.msgs = msgs;
ctx.seqnum = cmd->seqnum = mnl_seqnum_alloc(&seqnum);
ctx.batch = batch;
- ctx.octx = &nft->output;
- ctx.nf_sock = nf_sock;
- ctx.cache = &nft->cache;
- ctx.debug_mask = nft->debug_mask;
+ ctx.nft = nft;
init_list_head(&ctx.list);
ret = do_command(&ctx, cmd);
if (ret < 0) {
@@ -480,8 +477,7 @@ int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename)
LIST_HEAD(cmds);
int rc;
- rc = cache_update(nft->nf_sock, &nft->cache, CMD_INVALID, &msgs,
- nft->debug_mask, &nft->output);
+ rc = cache_update(nft, CMD_INVALID, &msgs);
if (rc < 0)
return -1;