summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/actions.c
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-06-13 20:11:44 +0200
committerJesse Gross <jesse@nicira.com>2013-06-15 00:09:12 +0200
commitb34df5e805a6e98cae0bc5bc80c1b52d9ff811de (patch)
treecc8d94ee92741fe21380180aeff3a6f12bb44adb /net/openvswitch/actions.c
parentopenvswitch: Fix struct comment. (diff)
downloadlinux-b34df5e805a6e98cae0bc5bc80c1b52d9ff811de.tar.xz
linux-b34df5e805a6e98cae0bc5bc80c1b52d9ff811de.zip
openvswitch: make skb->csum consistent with rest of networking stack.
Following patch keeps skb->csum correct across ovs. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/actions.c')
-rw-r--r--net/openvswitch/actions.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 894b6cbdd929..596d6373399d 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -130,9 +130,13 @@ static int set_eth_addr(struct sk_buff *skb,
if (unlikely(err))
return err;
+ skb_postpull_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2);
+
memcpy(eth_hdr(skb)->h_source, eth_key->eth_src, ETH_ALEN);
memcpy(eth_hdr(skb)->h_dest, eth_key->eth_dst, ETH_ALEN);
+ ovs_skb_postpush_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2);
+
return 0;
}