Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932209Ab0G3Oa2 (ORCPT ); Fri, 30 Jul 2010 10:30:28 -0400 Received: from helcar.apana.org.au ([209.40.204.226]:38812 "EHLO fornost.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692Ab0G3Oa1 (ORCPT ); Fri, 30 Jul 2010 10:30:27 -0400 Date: Fri, 30 Jul 2010 22:30:16 +0800 From: Herbert Xu To: Changli Gao Cc: Jamal Hadi Salim , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Patrick McHardy Subject: Re: [PATCH] act_nat: the checksum of ICMP doesn't have pseudo header Message-ID: <20100730143016.GA10543@gondor.apana.org.au> References: <1280448258-1893-1-git-send-email-xiaosuo@gmail.com> <20100730090922.GA7807@gondor.apana.org.au> <20100730102409.GA8590@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1133 Lines: 26 On Fri, Jul 30, 2010 at 10:16:05PM +0800, Changli Gao wrote: > > 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. Actually you are right. I suppose the only reason this has never shown up is because CHEKSUM_PARTIAL doesn't usually occur with forwarded packets. Acked-by: Herbert Xu Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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/