]> git.itanic.dy.fi Git - linux-stable/commit
netfilter: nftables: add nft_parse_register_load() and use it
authorPablo Neira Ayuso <pablo@netfilter.org>
Sat, 27 May 2023 16:08:01 +0000 (18:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 11:38:37 +0000 (12:38 +0100)
commit09c5c2ede3fdf8dac99a4c486f428e212469f533
tree5b55326aed7474f1e2b50b68171e15b4fde940ad
parentbb0248deecf1f95a0dd9fe373f7b13cc0f8c8a30
netfilter: nftables: add nft_parse_register_load() and use it

[ backport of 4f16d25c68ec844299a4df6ecbb0234eaf88a935 ]

This new function combines the netlink register attribute parser
and the load validation function.

This update requires to replace:

enum nft_registers      sreg:8;

in many of the expression private areas otherwise compiler complains
with:

error: cannot take address of bit-field ‘sreg’

when passing the register field as reference.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 files changed:
include/net/netfilter/nf_tables.h
include/net/netfilter/nf_tables_core.h
include/net/netfilter/nft_masq.h
include/net/netfilter/nft_meta.h
include/net/netfilter/nft_redir.h
net/ipv4/netfilter/nft_dup_ipv4.c
net/ipv6/netfilter/nft_dup_ipv6.c
net/netfilter/nf_tables_api.c
net/netfilter/nft_bitwise.c
net/netfilter/nft_byteorder.c
net/netfilter/nft_cmp.c
net/netfilter/nft_ct.c
net/netfilter/nft_dup_netdev.c
net/netfilter/nft_dynset.c
net/netfilter/nft_exthdr.c
net/netfilter/nft_fwd_netdev.c
net/netfilter/nft_hash.c
net/netfilter/nft_lookup.c
net/netfilter/nft_masq.c
net/netfilter/nft_meta.c
net/netfilter/nft_nat.c
net/netfilter/nft_objref.c
net/netfilter/nft_payload.c
net/netfilter/nft_queue.c
net/netfilter/nft_range.c
net/netfilter/nft_redir.c