aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index e6e1f85f1bbd..0d22008d522e 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -383,9 +383,10 @@ static inline int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh)
383 skb->ip_summed = CHECKSUM_UNNECESSARY; 383 skb->ip_summed = CHECKSUM_UNNECESSARY;
384 384
385 if (skb->ip_summed != CHECKSUM_UNNECESSARY) 385 if (skb->ip_summed != CHECKSUM_UNNECESSARY)
386 skb->csum = ~csum_ipv6_magic(&skb->nh.ipv6h->saddr, 386 skb->csum = ~csum_unfold(csum_ipv6_magic(&skb->nh.ipv6h->saddr,
387 &skb->nh.ipv6h->daddr, 387 &skb->nh.ipv6h->daddr,
388 skb->len, IPPROTO_UDP, 0); 388 ulen, IPPROTO_UDP,
389 0));
389 390
390 return (UDP_SKB_CB(skb)->partial_cov = 0); 391 return (UDP_SKB_CB(skb)->partial_cov = 0);
391} 392}
@@ -511,7 +512,7 @@ static int udp_v6_push_pending_frames(struct sock *sk, struct udp_sock *up)
511 struct inet_sock *inet = inet_sk(sk); 512 struct inet_sock *inet = inet_sk(sk);
512 struct flowi *fl = &inet->cork.fl; 513 struct flowi *fl = &inet->cork.fl;
513 int err = 0; 514 int err = 0;
514 u32 csum = 0; 515 __wsum csum = 0;
515 516
516 /* Grab the skbuff where UDP header space exists. */ 517 /* Grab the skbuff where UDP header space exists. */
517 if ((skb = skb_peek(&sk->sk_write_queue)) == NULL) 518 if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)