diff options
author | Saurabh Mohan <saurabh@vyatta.com> | 2013-06-10 17:45:10 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-13 02:47:46 -0700 |
commit | baafc77b32f647daa7c45825f7af8cdd55d00817 (patch) | |
tree | 1024857527720aa8acffdb47e352a6dc964dc60a /net/ipv4/ip_vti.c | |
parent | df465abfe06f7dc4f33f4a96d17f096e9e8ac917 (diff) | |
download | talos-obmc-linux-baafc77b32f647daa7c45825f7af8cdd55d00817.tar.gz talos-obmc-linux-baafc77b32f647daa7c45825f7af8cdd55d00817.zip |
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/ip_vti.c')
-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) 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); |