All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>
Subject: [PATCH] net: reset ip_summed in skb_tunnel_rx()
Date: Sun, 29 Aug 2010 09:48:44 +0200	[thread overview]
Message-ID: <1283068124.2277.230.camel@edumazet-laptop> (raw)
In-Reply-To: <4C74C0C4.5060102@fs.uni-ruse.bg>

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 <eric.dumazet@gmail.com>
---
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);




  reply	other threads:[~2010-08-29  7:48 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-16626-10286@https.bugzilla.kernel.org/>
2010-08-19 22:21 ` [Bugme-new] [Bug 16626] New: Machine hangs with EIP at skb_copy_and_csum_dev Andrew Morton
2010-08-20  5:03   ` Plamen Petrov
2010-08-20  5:11     ` Andrew Morton
2010-08-20  6:12       ` Plamen Petrov
2010-08-20  6:20         ` Andrew Morton
2010-08-20  6:26           ` Plamen Petrov
2010-08-20  6:34             ` Eric Dumazet
2010-08-20  6:57               ` Plamen Petrov
2010-08-20  7:38               ` Plamen Petrov
2010-08-20  8:31               ` Plamen Petrov
2010-08-20  9:19                 ` Plamen Petrov
2010-08-20 10:26                   ` Eric Dumazet
2010-08-20 10:53                     ` Plamen Petrov
2010-08-20 19:38                       ` Jarek Poplawski
2010-08-21  7:47                         ` Jarek Poplawski
2010-08-21  7:50                           ` Eric Dumazet
2010-08-21  8:07                             ` Jarek Poplawski
2010-08-23 11:47                               ` Plamen Petrov
2010-08-23 12:35                                 ` Eric Dumazet
2010-08-23 12:47                                 ` Jarek Poplawski
2010-08-23 13:00                                   ` Eric Dumazet
2010-08-23 13:10                                     ` Jarek Poplawski
2010-08-23 13:43                                       ` Plamen Petrov
2010-08-23 14:05                                         ` Plamen Petrov
2010-08-23 14:14                                           ` Jarek Poplawski
2010-08-24  4:51                                             ` Plamen Petrov
2010-08-24  5:01                                               ` Eric Dumazet
2010-08-24  8:43                                                 ` Plamen Petrov
2010-08-24 13:27                                                   ` Plamen Petrov
2010-08-24 15:08                                                     ` Eric Dumazet
2010-08-24 17:25                                                       ` Plamen Petrov
2010-08-24 18:22                                                         ` Jarek Poplawski
2010-08-24 19:19                                                         ` Eric Dumazet
2010-08-25  7:05                                                           ` Plamen Petrov
2010-08-29  7:48                                                             ` Eric Dumazet [this message]
2010-08-29 15:35                                                               ` [PATCH] net: reset ip_summed in skb_tunnel_rx() Jesse Gross
2010-08-27  8:44                                                       ` [Bugme-new] [Bug 16626] New: Machine hangs with EIP at skb_copy_and_csum_dev Plamen Petrov
2010-08-24  5:19                                               ` Plamen Petrov
2010-08-24  6:18                                                 ` Jarek Poplawski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283068124.2277.230.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.