Re: [PATCH] [netfilter]: Fix skb->csum calculation when netfilter manipulation for NF_NAT_MANIP_SRC\DST is done on IPV6 packet.

From: Florian Westphal
Date: Wed Oct 23 2019 - 21:12:28 EST


praveen chaudhary <praveen5582@xxxxxxxxx> wrote:
> inet_proto_csum_replace16 is called from many places, whereas this fix is
> applicable only for nf_nat_ipv6_csum_update. where we need to update
> skb->csum for ipv6 src/dst address change.

Under which circumstances does inet_proto_csum_replace16 upate
skb->csum correctly?

> So, I added a new function. Basically, I used a safe approach to fix it,
> without impacting other cases. Let me know other options, I am open to
> suggestions.

You seem to imply inet_proto_csum_replace16 is fine and only broken for ipv6
nat.