netfilter: bridge: move pskb_trim_rcsum out of br_nf_check_hbh_len
authorXin Long <lucien.xin@gmail.com>
Tue, 7 Mar 2023 21:31:29 +0000 (16:31 -0500)
committerFlorian Westphal <fw@strlen.de>
Wed, 8 Mar 2023 13:25:40 +0000 (14:25 +0100)
commit0b24bd71a6c0214aaa2115302dd6598b89d2fa8a
tree1783db875fe7e229fd2f05f4cfc4874052acd17c
parenta7f1a2f43e683c8ffca691d45f2cb32c052158fa
netfilter: bridge: move pskb_trim_rcsum out of br_nf_check_hbh_len

br_nf_check_hbh_len() is a function to check the Hop-by-hop option
header, and shouldn't do pskb_trim_rcsum() there. This patch is to
pass pkt_len out to br_validate_ipv6() and do pskb_trim_rcsum()
after calling br_validate_ipv6() instead.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/bridge/br_netfilter_ipv6.c