[ovs-dev] [PATCH 1/2] tunneling: Refresh IP header pointer after update_header().
Jesse Gross
jesse at nicira.com
Thu Dec 16 04:15:58 UTC 2010
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 <jesse at nicira.com>
---
datapath/tunnel.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index bf66f4f..eac3fa3 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);
--
1.7.1
More information about the dev
mailing list