Message ID | 20160506043304.GA9342@penelope.isobedori.kobe.vergenet.net |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 63d29263d51a..89ad0027420a 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -161,6 +160,14 @@ static int push_mpls(struct sk_buff *skb, struct sw_flow_key *key, struct ethhdr *hdr; hdr = eth_hdr(skb); + + if (skb->ip_summed == CHECKSUM_COMPLETE) { + __be16 diff[] = { ~(hdr->h_proto), mpls->mpls_ethertype }; + + skb->csum = ~csum_partial((char *)diff, sizeof(diff), + ~skb->csum); + } + hdr->h_proto = mpls->mpls_ethertype; }