netfilter: nft_payload: do not update layer 4 checksum when mangling fragments
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 netfilter: nft_payload: do not update layer 4 checksum when mangling fragments
IP fragments do not come with the transport header, hence skip bogus layer 4 checksum updates.
Reported-by Steffen Weinreich <[email protected]>
Tested-by Steffen Weinreich <[email protected]>
Fixes 1814096980bb ("netfilter: nft_payload: layer 4 checksum adjustment for pseudoheader fields")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- net/netfilter/nft_payload.c | 3 +++ 1 file changed, 3 insertions(+)
net/netfilter/nft_payload.c +3 -0
@@ -546,6 +546,9 @@ static int nft_payload_l4csum_offset(const struct nft_pktinfo *pkt, struct sk_buff *skb, unsigned int *l4csum_offset) { +if (pkt->fragoff) +return -1 ; +switch (pkt->tprot) {case IPPROTO_TCP : *l4csum_offset = offsetof(struct tcphdr , check);
Signature · 1 line
2.30.2