From 3d8981230bb0c9c11db70f1444e4940ac02d3888 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Wed, 15 Dec 2010 15:38:06 -0800 Subject: [PATCH] tunneling: Refresh IP header pointer after update_header(). We were assuming that the call to update_header() to finalize tunnel headers wouldn't cause the skb linear data area to be reallocated. So far this hasn't been a problem but it's not, generally speaking, a good assumption to make. Therefore, refetch the pointer to the IP header instead of carrying it across the call. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- datapath/tunnel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index bf66f4f09..eac3fa3d8 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -1284,6 +1284,7 @@ int tnl_send(struct vport *vport, struct sk_buff *skb) struct vport *cache_vport = internal_dev_get_vport(rt_dst(rt).dev); skb->protocol = htons(ETH_P_IP); + iph = ip_hdr(skb); iph->tot_len = htons(skb->len - skb_network_offset(skb)); ip_send_check(iph); -- 2.43.0