/*
- * Copyright (c) 2007-2011 Nicira Networks.
+ * Copyright (c) 2007-2011 Nicira, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
if (!vlan_tx_tag_present(skb))
return 0;
- skb = __vlan_put_tag(skb, vlan_tx_tag_get(skb));
+ skb = __vlan_put_tag(skb, skb->vlan_proto, vlan_tx_tag_get(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;
}