aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-04-09 14:59:39 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:43 -0400
commit604763722c655c7e3f31ecf6f7b4dafcd26a7a15 (patch)
treea5c07f0e22ac86e7ca7a8c80bd3f111116610edd /net/ipv6/raw.c
parent628592ccdbbb5bb751217cf02e2e7abb500d7ffe (diff)
[NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY
When a transmitted packet is looped back directly, CHECKSUM_PARTIAL maps to the semantics of CHECKSUM_UNNECESSARY. Therefore we should treat it as such in the stack. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r--net/ipv6/raw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 2b3be68b70a7..f65fcd7704ca 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -368,7 +368,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
368 skb->len, inet->num, skb->csum)) 368 skb->len, inet->num, skb->csum))
369 skb->ip_summed = CHECKSUM_UNNECESSARY; 369 skb->ip_summed = CHECKSUM_UNNECESSARY;
370 } 370 }
371 if (skb->ip_summed != CHECKSUM_UNNECESSARY) 371 if (!skb_csum_unnecessary(skb))
372 skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, 372 skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
373 &ipv6_hdr(skb)->daddr, 373 &ipv6_hdr(skb)->daddr,
374 skb->len, 374 skb->len,
@@ -421,7 +421,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk,
421 msg->msg_flags |= MSG_TRUNC; 421 msg->msg_flags |= MSG_TRUNC;
422 } 422 }
423 423
424 if (skb->ip_summed==CHECKSUM_UNNECESSARY) { 424 if (skb_csum_unnecessary(skb)) {
425 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); 425 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
426 } else if (msg->msg_flags&MSG_TRUNC) { 426 } else if (msg->msg_flags&MSG_TRUNC) {
427 if (__skb_checksum_complete(skb)) 427 if (__skb_checksum_complete(skb))