diff options
author | Giuseppe Longo <giuseppelng@gmail.com> | 2013-07-30 14:03:46 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-12-30 23:50:41 +0100 |
commit | cea310bd1d078618e87b83410f8c6f75b34de450 (patch) | |
tree | e1e3a9f600050e25cc95c21220ba24aab4916c5a /iptables/xtables-config-parser.y | |
parent | 2bf54fd4eca0ea19e8effeb487d87b2e5a2cdc10 (diff) |
nft: load only the tables of the current family
This changes nft_xtables_config_load() permit to load only
the tables of the current family.
[ This patch includes a fix for the configuration parser
that I detected while testing this patch --pablo ]
Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-config-parser.y')
-rw-r--r-- | iptables/xtables-config-parser.y | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/iptables/xtables-config-parser.y b/iptables/xtables-config-parser.y index e7a8a07e..36dae38d 100644 --- a/iptables/xtables-config-parser.y +++ b/iptables/xtables-config-parser.y @@ -228,7 +228,8 @@ int xtables_config_parse(char *filename, struct nft_table_list *table_list, } nft_chain_attr_set(chain, NFT_CHAIN_ATTR_TABLE, (char *)nft_table_attr_get(table, NFT_TABLE_ATTR_NAME)); - nft_table_attr_set_u32(table, NFT_CHAIN_ATTR_FAMILY, family); + nft_chain_attr_set_u32(chain, NFT_CHAIN_ATTR_FAMILY, + nft_table_attr_get_u32(table, NFT_TABLE_ATTR_FAMILY)); nft_chain_attr_set_s32(chain, NFT_CHAIN_ATTR_PRIO, prio); nft_chain_attr_set(chain, NFT_CHAIN_ATTR_NAME, e->data); /* Intentionally prepending, instead of appending */ |