summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-08-17 12:03:32 -0700
committerDavid S. Miller <davem@davemloft.net>2005-08-17 12:03:32 -0700
commit97077c4a9868fce8ac151512cde5d24fc1144f24 (patch)
tree600484f09f59126988fb153287bad7a27a511931 /net
parent2ad56496627630ebc99f06af5f81ca23e17e014e (diff)
downloadlinux-3.10-97077c4a9868fce8ac151512cde5d24fc1144f24.tar.gz
linux-3.10-97077c4a9868fce8ac151512cde5d24fc1144f24.tar.bz2
linux-3.10-97077c4a9868fce8ac151512cde5d24fc1144f24.zip
[IPV6]: Fix raw socket hardware checksum failures
When packets hit raw sockets the csum update isn't done yet, do it manually. Packets can also reach rawv6_rcv on the output path through ip6_call_ra_chain, in this case skb->ip_summed is CHECKSUM_NONE and this codepath isn't executed. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/raw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index e2b848ec985..1d4d75b34d3 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -328,6 +328,8 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
if (skb->ip_summed != CHECKSUM_UNNECESSARY) {
if (skb->ip_summed == CHECKSUM_HW) {
+ skb_postpull_rcsum(skb, skb->nh.raw,
+ skb->h.raw - skb->nh.raw);
skb->ip_summed = CHECKSUM_UNNECESSARY;
if (csum_ipv6_magic(&skb->nh.ipv6h->saddr,
&skb->nh.ipv6h->daddr,