netfilter: nf_tables: add register parsing/dumping helpers
Add helper functions to parse and dump register values in netlink attributes. These helpers will later be changed to take care of translation between the old 128 bit and the new 32 bit register numbers. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
8cd8937ac0
commit
b1c96ed37c
15 changed files with 68 additions and 53 deletions
|
@ -65,7 +65,7 @@ static int nft_meta_bridge_get_init(const struct nft_ctx *ctx,
|
|||
return nft_meta_get_init(ctx, expr, tb);
|
||||
}
|
||||
|
||||
priv->dreg = ntohl(nla_get_be32(tb[NFTA_META_DREG]));
|
||||
priv->dreg = nft_parse_register(tb[NFTA_META_DREG]);
|
||||
return nft_validate_register_store(ctx, priv->dreg, NULL,
|
||||
NFT_DATA_VALUE, len);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue