diff options
author | Varsha Rao <rvarsha016@gmail.com> | 2017-08-13 10:00:18 +0530 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-08-14 11:32:21 +0200 |
commit | 07b45939972eb81c3c3db21c8589b51a62f4843a (patch) | |
tree | b50dfd024653fd11f63821e2e7e4805dbb16036b /src/parser_bison.y | |
parent | bb8e9e84a1b537ccf1b7abbc9d11af0383801a0d (diff) |
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 <rvarsha016@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r-- | src/parser_bison.y | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |