Commit 758dbcec authored by Tomasz Bursztyka's avatar Tomasz Bursztyka Committed by Pablo Neira Ayuso

netfilter: nf_tables: Stack expression type depending on their family

To ensure family tight expression gets selected in priority to family
agnostic ones.
Signed-off-by: default avatarTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 60eb1894
......@@ -1093,7 +1093,10 @@ static void nft_ctx_init(struct nft_ctx *ctx,
int nft_register_expr(struct nft_expr_type *type)
{
nfnl_lock(NFNL_SUBSYS_NFTABLES);
if (type->family == NFPROTO_UNSPEC)
list_add_tail(&type->list, &nf_tables_expressions);
else
list_add(&type->list, &nf_tables_expressions);
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment