From 07b45939972eb81c3c3db21c8589b51a62f4843a Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Sun, 13 Aug 2017 10:00:18 +0530 Subject: src: introduce struct nft_cache Pass variable cache_initialized and structure list_head as members of structure nft_cache. Joint work with Pablo Neira. Signed-off-by: Varsha Rao Signed-off-by: Pablo Neira Ayuso --- src/parser_bison.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/parser_bison.y') diff --git a/src/parser_bison.y b/src/parser_bison.y index e7bb9097..783b72f5 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -35,14 +35,15 @@ #include "parser_bison.h" -void parser_init(struct mnl_socket *nf_sock, struct parser_state *state, - struct list_head *msgs) +void parser_init(struct mnl_socket *nf_sock, struct nft_cache *cache, + struct parser_state *state, struct list_head *msgs) { memset(state, 0, sizeof(*state)); init_list_head(&state->cmds); init_list_head(&state->top_scope.symbols); state->msgs = msgs; state->scopes[0] = scope_init(&state->top_scope, NULL); + state->ectx.cache = cache; state->ectx.msgs = msgs; state->ectx.nf_sock = nf_sock; } -- cgit v1.2.3