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>
This commit is contained in:

committed by
David S. Miller

parent
ed70fcfcee
commit
e4f45b7f40
@@ -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);
|
||||
|
Reference in New Issue
Block a user