diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2016-02-20 00:29:30 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-18 17:06:36 -0700 |
commit | 79fdabe8706bd240c083a848f64081a4bc46d7af (patch) | |
tree | 8407b56b448a86aec07fd5dcbdcdb5e82d2ffe23 /net/core/skbuff.c | |
parent | 1d794379798b33797d9afe4a477bfd89ce399184 (diff) |
net: use skb_postpush_rcsum instead of own implementations
[ Upstream commit 6b83d28a55a891a9d70fc61ccb1c138e47dcbe74 ]
Replace individual implementations with the recently introduced
skb_postpush_rcsum() helper.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Tom Herbert <tom@herbertland.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 8616d1147c93..78abe110c7a5 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4433,9 +4433,7 @@ int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci) skb->mac_len += VLAN_HLEN; __skb_pull(skb, offset); - if (skb->ip_summed == CHECKSUM_COMPLETE) - skb->csum = csum_add(skb->csum, csum_partial(skb->data - + (2 * ETH_ALEN), VLAN_HLEN, 0)); + skb_postpush_rcsum(skb, skb->data + (2 * ETH_ALEN), VLAN_HLEN); } __vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci); return 0; |