netfilter: nf_tables: introduce nft_validate_register_load()
Change nft_validate_input_register() to not only validate the input register number, but also the length of the load, and rename it to nft_validate_register_load() to reflect that change. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
27e6d2017a
commit
d07db9884a
@@ -112,13 +112,12 @@ static inline enum nft_registers nft_type_to_reg(enum nft_data_types type)
|
||||
return type == NFT_DATA_VERDICT ? NFT_REG_VERDICT : NFT_REG_1;
|
||||
}
|
||||
|
||||
int nft_validate_input_register(enum nft_registers reg);
|
||||
int nft_validate_register_load(enum nft_registers reg, unsigned int len);
|
||||
int nft_validate_register_store(const struct nft_ctx *ctx,
|
||||
enum nft_registers reg,
|
||||
const struct nft_data *data,
|
||||
enum nft_data_types type, unsigned int len);
|
||||
|
||||
|
||||
/**
|
||||
* struct nft_userdata - user defined data associated with an object
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user