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 <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
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;
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));