diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2016-02-20 00:29:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-19 23:43:10 -0500 |
commit | 6b83d28a55a891a9d70fc61ccb1c138e47dcbe74 (patch) | |
tree | 53d156b1995604c21cd21579b98c4d82333d588f /net/core/skbuff.c | |
parent | 321b4d4bd12f90e7497c9ab057aafcc2649aa902 (diff) | |
download | op-kernel-dev-6b83d28a55a891a9d70fc61ccb1c138e47dcbe74.zip op-kernel-dev-6b83d28a55a891a9d70fc61ccb1c138e47dcbe74.tar.gz |
net: use skb_postpush_rcsum instead of own implementations
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>
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 a5bd067..8bd4b79 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4496,9 +4496,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; |