aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSaurabh Mohan <saurabh@vyatta.com>2013-06-10 17:45:10 -0700
committerDavid S. Miller <davem@davemloft.net>2013-06-13 02:47:46 -0700
commitbaafc77b32f647daa7c45825f7af8cdd55d00817 (patch)
tree1024857527720aa8acffdb47e352a6dc964dc60a /net
parentdf465abfe06f7dc4f33f4a96d17f096e9e8ac917 (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')
-rw-r--r--net/ipv4/ip_vti.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 9d2bdb2c1d3..c118f6b576b 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);