diff options
author | Tom Herbert <therbert@google.com> | 2014-05-02 16:29:51 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-05 15:26:30 -0400 |
commit | e4f45b7f40bdaade5ef8f45e7c6daed4c909fdf5 (patch) | |
tree | bdde80c080674909cf22779940b9615053af1081 /net/ipv6/ip6_checksum.c | |
parent | ed70fcfcee953a76028bfc3f963d2167c2990020 (diff) | |
download | op-kernel-dev-e4f45b7f40bdaade5ef8f45e7c6daed4c909fdf5.zip op-kernel-dev-e4f45b7f40bdaade5ef8f45e7c6daed4c909fdf5.tar.gz |
net: Call skb_checksum_init in IPv6
Call skb_checksum_init instead of private functions.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_checksum.c')
-rw-r--r-- | net/ipv6/ip6_checksum.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/ipv6/ip6_checksum.c b/net/ipv6/ip6_checksum.c index ee7a97f..c69fe37 100644 --- a/net/ipv6/ip6_checksum.c +++ b/net/ipv6/ip6_checksum.c @@ -84,16 +84,7 @@ int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto) &ipv6_hdr(skb)->daddr, ntohs(uh->dest)); return 1; } - if (skb->ip_summed == CHECKSUM_COMPLETE && - !csum_ipv6_magic(&ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, - skb->len, proto, skb->csum)) - skb->ip_summed = CHECKSUM_UNNECESSARY; - if (!skb_csum_unnecessary(skb)) - skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, - &ipv6_hdr(skb)->daddr, - skb->len, proto, 0)); - - return 0; + return skb_checksum_init(skb, IPPROTO_UDP, ip6_compute_pseudo); } EXPORT_SYMBOL(udp6_csum_init); |