diff options
author | Saurabh Mohan <saurabh@vyatta.com> | 2013-06-10 20:45:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-13 05:47:46 -0400 |
commit | baafc77b32f647daa7c45825f7af8cdd55d00817 (patch) | |
tree | 1024857527720aa8acffdb47e352a6dc964dc60a /net/ipv4 | |
parent | df465abfe06f7dc4f33f4a96d17f096e9e8ac917 (diff) |
net/ipv4: ip_vti clear skb cb before tunneling.
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>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | 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 9d2bdb2c1d3f..c118f6b576bb 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) | |||
361 | tunnel->err_count = 0; | 361 | tunnel->err_count = 0; |
362 | } | 362 | } |
363 | 363 | ||
364 | IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | | 364 | memset(IPCB(skb), 0, sizeof(*IPCB(skb))); |
365 | IPSKB_REROUTED); | ||
366 | skb_dst_drop(skb); | 365 | skb_dst_drop(skb); |
367 | skb_dst_set(skb, &rt->dst); | 366 | skb_dst_set(skb, &rt->dst); |
368 | nf_reset(skb); | 367 | nf_reset(skb); |