netfilter: nft_payload: do not truncate csum_offset and csum_type
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 21 Aug 2022 09:55:19 +0000 (11:55 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 24 Aug 2022 05:43:21 +0000 (07:43 +0200)
commit7044ab281febae9e2fa9b0b247693d6026166293
tree8d40daa5aa8999594c4ec0f242cd5c9d50b1cedb
parent94254f990c07e9ddf1634e0b727fab821c3b5bf9
netfilter: nft_payload: do not truncate csum_offset and csum_type

Instead report ERANGE if csum_offset is too long, and EOPNOTSUPP if type
is not support.

Fixes: 7ec3f7b47b8d ("netfilter: nft_payload: add packet mangling support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_payload.c