|
Description
|
The nat_calc_chksum_diffs() introduced in 6629154, does not compute chksum delta (adjustment) properly for ICMP packets.
The problem is that the NICs with partial chksum delta offload does not handle
chksums for ICMP packets. The ICMP packets must be handled as no partial chksum
would be ever used.
there are two fields in NAT entry structure:
nat_sumd[0] -- holds adjustment for no chksum offload
nat_sumd[1] -- holds adjustment for partial chksum offload.
if ICMP protocol is handled, then nat_calc_chksum_diffs() function will perform
nat_sumd[1] = nat_sumd[0] - to enforce use of proper chksum adjustment, when
packets are translated. also some sanity counter measures were also
introduced: if the L4 header does not use any kind of chksum, then the both
fields (nat_sumd[0], nat_sumd[1]) are set to zero. the fix also going to use
nat_flags to determine which protocol is handled (TCP/UDP/ICMP).
|