From: Jesse Gross Date: Fri, 19 Nov 2010 21:10:14 +0000 (-0800) Subject: tunneling: Clear OVS_CB after call to update_header(). X-Git-Tag: v1.1.0~779 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7da5c9390e3b6c3ad5e0443e171e570fc16ff978;p=sliver-openvswitch.git tunneling: Clear OVS_CB after call to update_header(). If a packet is traversing the IP stack we need to clear some pieces of the skb CB beforehand. We currently do this before the call to update_header() but header generation may need some members of the CB, such as the key. Therefore, zero out the CB only after the header is complete. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- diff --git a/datapath/tunnel.c b/datapath/tunnel.c index cf742125e..4a60fa786 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -1100,6 +1100,9 @@ static int send_frags(struct sk_buff *skb, skb->next = NULL; + memset(&IPCB(skb)->opt, 0, sizeof(IPCB(skb)->opt)); + IPCB(skb)->flags = 0; + err = ip_local_out(skb); if (likely(net_xmit_eval(err) == 0)) sent_len += frag_len; @@ -1247,10 +1250,6 @@ int tnl_send(struct vport *vport, struct sk_buff *skb) skb_dst_set(skb, unattached_dst); unattached_dst = NULL; } - - - memset(&IPCB(skb)->opt, 0, sizeof(IPCB(skb)->opt)); - IPCB(skb)->flags = 0; } skb_set_transport_header(skb, skb_network_offset(skb) + sizeof(struct iphdr));