[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimKXsgmOSVmw-cP6Zw6UoK5CSshK38Oo5tLuAeA@mail.gmail.com>
Date: Fri, 30 Jul 2010 22:16:05 +0800
From: Changli Gao <xiaosuo@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Jamal Hadi Salim <hadi@...erus.ca>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Patrick McHardy <kaber@...sh.net>
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@...dor.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@...il.com)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists