datapath: make skb->csum consistent with rest of networking stack.
[sliver-openvswitch.git] / datapath / vlan.h
index 5d3573b..46d0db3 100644 (file)
@@ -93,6 +93,11 @@ static inline int vlan_deaccel_tag(struct sk_buff *skb)
        if (unlikely(!skb))
                return -ENOMEM;
 
+       if (get_ip_summed(skb) == OVS_CSUM_COMPLETE)
+               skb->csum = csum_add(skb->csum,
+                                    csum_partial(skb->data + (2 * ETH_ALEN),
+                                                 VLAN_HLEN, 0));
+
        vlan_set_tci(skb, 0);
        return 0;
 }