Messages in this thread | | | From | Changli Gao <> | Date | Fri, 30 Jul 2010 22:16:05 +0800 | Subject | Re: [PATCH] act_nat: the checksum of ICMP doesn't have pseudo header |
| |
On Fri, Jul 30, 2010 at 6:24 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote: > > The checksum update is for the inner IP header. netfilter does > of course update the checksum, it just doesn't do it here which is > for the outer IP header. >
I know we need to update the ICMP checksum if we alter the payload(the inner IP header here) of ICMP. But I doubt if the update is really necessary if the checksum is partial, as the checksum will be done later(by ether skb_checksum_help() or NIC hardware). In fact, as there isn't any pseudo header, the icmph->checksum should be always ZERO, otherwise skb_checksum_help() or NIC will give the wrong checksums, when the checksum is partial.
-- Regards, Changli Gao(xiaosuo@gmail.com) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |