X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Fvlan.h;h=aee5551441f147f028be60e6bbff62a40b70155d;hb=a91da17ea6f910863c2a771ebfa4100bbad3f481;hp=d6e9b32b37ff04eede7e24462608015c3e80cf85;hpb=a9a29d22d8f485bb90bb49ae9ddff8c3c1ab04f5;p=sliver-openvswitch.git diff --git a/datapath/vlan.h b/datapath/vlan.h index d6e9b32b3..aee555144 100644 --- a/datapath/vlan.h +++ b/datapath/vlan.h @@ -1,5 +1,5 @@ /* - * 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 @@ -89,10 +89,15 @@ static inline int vlan_deaccel_tag(struct sk_buff *skb) 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; }