Thread (39 messages) 39 messages, 5 authors, 2010-08-29
STALE5773d

[PATCH] net: reset ip_summed in skb_tunnel_rx()

From: Eric Dumazet <hidden>
Date: 2010-08-29 07:48:49
Subsystem: networking [general], networking [ipv4/ipv6], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern, Ido Schimmel, Linus Torvalds

It seems we forget to reset skb->ip_summed to CHECKSUM_NONE in various
tunnels (gre, ipip, sit, ip6_tunnel), before re-entering stack.

Add ip_summed initialization in skb_tunnel_rx(), and remove it from
ipmr / ip6mr

Signed-off-by: Eric Dumazet <redacted>
---
include/net/dst.h |    1 +
net/ipv4/ipmr.c   |    1 -
net/ipv6/ip6mr.c  |    1 -
3 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/net/dst.h b/include/net/dst.h
index 81d1413..2ef5580 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -237,6 +237,7 @@ static inline void skb_dst_force(struct sk_buff *skb)
  */
 static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev)
 {
+	skb->ip_summed = CHECKSUM_NONE;
 	skb->dev = dev;
 	/* TODO : stats should be SMP safe */
 	dev->stats.rx_packets++;
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 179fcab..70fa43b 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1837,7 +1837,6 @@ static int __pim_rcv(struct mr_table *mrt, struct sk_buff *skb,
 	skb_pull(skb, (u8*)encap - skb->data);
 	skb_reset_network_header(skb);
 	skb->protocol = htons(ETH_P_IP);
-	skb->ip_summed = 0;
 	skb->pkt_type = PACKET_HOST;
 
 	skb_tunnel_rx(skb, reg_dev);
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 66078da..c4d0146 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -661,7 +661,6 @@ static int pim6_rcv(struct sk_buff *skb)
 	skb_pull(skb, (u8 *)encap - skb->data);
 	skb_reset_network_header(skb);
 	skb->protocol = htons(ETH_P_IPV6);
-	skb->ip_summed = 0;
 	skb->pkt_type = PACKET_HOST;
 
 	skb_tunnel_rx(skb, reg_dev);


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help