netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] act_nat: the checksum of ICMP doesn't have pseudo header
@ 2010-07-30  0:04 Changli Gao
  2010-07-30  9:09 ` Herbert Xu
  0 siblings, 1 reply; 7+ messages in thread
From: Changli Gao @ 2010-07-30  0:04 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Jamal Hadi Salim, David S. Miller, netdev, linux-kernel,
	Changli Gao

after updating the value of the ICMP payload, inet_proto_csum_replace4() should
be called with zero pseudohdr.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 net/sched/act_nat.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 24e614c..59f05ee 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -246,7 +246,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
 			iph->saddr = new_addr;
 
 		inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
-					 1);
+					 0);
 		break;
 	}
 	default:

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-01  5:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-30  0:04 [PATCH] act_nat: the checksum of ICMP doesn't have pseudo header Changli Gao
2010-07-30  9:09 ` Herbert Xu
2010-07-30 10:10   ` Changli Gao
2010-07-30 10:24     ` Herbert Xu
2010-07-30 14:16       ` Changli Gao
2010-07-30 14:30         ` Herbert Xu
2010-08-01  5:05           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).