From: Saurabh Mohan <saumoh@gmail.com>
To: netdev <netdev@vger.kernel.org>
Cc: Saurabh Mohan <saurabh@vyatta.com>
Subject: [PATCH net 1/1] net/ipv4: ip_vti clear skb cb before tunneling.
Date: Mon, 10 Jun 2013 17:45:10 -0700 [thread overview]
Message-ID: <1370911510-20012-1-git-send-email-saurabh.mohan@vyatta.com> (raw)
From: Saurabh Mohan <saurabh@vyatta.com>
If users apply shaper to vti tunnel then it will cause a kernel crash. The
problem seems to be due to the vti_tunnel_xmit function not clearing
skb->opt field before passing the packet to xfrm tunneling code.
Signed-off-by: Saurabh Mohan <saurabh@vyatta.com>
---
net/ipv4/ip_vti.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 9d2bdb2..c118f6b 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -361,8 +361,7 @@ static netdev_tx_t vti_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
tunnel->err_count = 0;
}
- IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED |
- IPSKB_REROUTED);
+ memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
skb_dst_drop(skb);
skb_dst_set(skb, &rt->dst);
nf_reset(skb);
--
1.7.2.5
next reply other threads:[~2013-06-11 0:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 0:45 Saurabh Mohan [this message]
2013-06-11 1:28 ` [PATCH net 1/1] net/ipv4: ip_vti clear skb cb before tunneling Stephen Hemminger
2013-06-13 9:48 ` David Miller
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=1370911510-20012-1-git-send-email-saurabh.mohan@vyatta.com \
--to=saumoh@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=saurabh@vyatta.com \
/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 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).