Netdev List
 help / color / mirror / Atom feed
* [IPVS]: Use skb_forward_csum
@ 2007-07-26  8:59 Herbert Xu
  2007-07-30 23:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2007-07-26  8:59 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: Simon Horman

Hi Dave:

Found this while looking at 8797.  Although it's not clear
that this is the cause yet (it could only happen if a
seemingly remote TCP stream is DNATed to a local address),
we need this patch anyway to avoid clobbering incoming
traffic with CHECKSUM_PARTIAL in its ip_summed field.

[IPVS]: Use skb_forward_csum

As a path that forwards packets, IPVS should be using
skb_forward_csum instead of directly setting ip_summed
to CHECKSUM_NONE.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c
index 900ce29..666e080 100644
--- a/net/ipv4/ipvs/ip_vs_xmit.c
+++ b/net/ipv4/ipvs/ip_vs_xmit.c
@@ -128,7 +128,7 @@ ip_vs_dst_reset(struct ip_vs_dest *dest)
 #define IP_VS_XMIT(skb, rt)				\
 do {							\
 	(skb)->ipvs_property = 1;			\
-	(skb)->ip_summed = CHECKSUM_NONE;		\
+	skb_forward_csum(skb);				\
 	NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, (skb), NULL,	\
 		(rt)->u.dst.dev, dst_output);		\
 } while (0)

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

end of thread, other threads:[~2007-07-30 23:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26  8:59 [IPVS]: Use skb_forward_csum Herbert Xu
2007-07-30 23:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox