2019-10-24 10:10:16

by Praveen Chaudhary

[permalink] [raw]
Subject: RE: [PATCH] [netfilter]: Fix skb->csum calculation when netfilter

Hi Florian

Thanks for the review,

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.
Also my point is, inet_proto_csum_replace16 is updating skb->csum for change in udp header checksum field, but that is not complete. So, I added a new function. Basically, I used a safe apprioach to fix it, without impacting other cases. Let me know other options, I am open to suggestions.

More importantly, I hope this is clear that the current code does not update skb->csum completely. Which is a bug. Thanks again.