netfilter: ip6t_NPT: Fix adjustment calculation
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Sat, 26 Jan 2013 08:37:48 +0000 (08:37 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 7 Feb 2013 17:37:41 +0000 (18:37 +0100)
Cast __wsum from/to __sum16 is wrong.  Instead, apply appropriate
conversion function: csum_unfold() or csum_fold().

[ The original patch has been modified to undo the final ~ that
  csum_fold returns. We only need to fold the 32-bit word that
  results from the checksum calculation into a 16-bit to ensure
  that the original subnet is restored appropriately. Spotted by
  Ulrich Weber. ]

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

No differences found