summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_checksum.c
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-05-02 16:29:51 -0700
committerDavid S. Miller <davem@davemloft.net>2014-05-05 15:26:30 -0400
commite4f45b7f40bdaade5ef8f45e7c6daed4c909fdf5 (patch)
treebdde80c080674909cf22779940b9615053af1081 /net/ipv6/ip6_checksum.c
parented70fcfcee953a76028bfc3f963d2167c2990020 (diff)
downloadlinux-stable-e4f45b7f40bdaade5ef8f45e7c6daed4c909fdf5.tar.gz
linux-stable-e4f45b7f40bdaade5ef8f45e7c6daed4c909fdf5.tar.bz2
linux-stable-e4f45b7f40bdaade5ef8f45e7c6daed4c909fdf5.zip
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.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/net/ipv6/ip6_checksum.c b/net/ipv6/ip6_checksum.c
index ee7a97f510cb..c69fe37b8104 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);