Commit e3f749c4 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[PPP]: Fixed hardware RX checksum handling

When we pull the PPP protocol off the skb, we forgot to update the
hardware RX checksum.  This may lead to messages such as

	dsl0: hw csum failure.

Similarly, we need to clear the hardware checksum flag when we use
the existing packet to store the decompressed result.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 410c0542
...@@ -1610,6 +1610,8 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) ...@@ -1610,6 +1610,8 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
} }
else if (!pskb_may_pull(skb, skb->len)) else if (!pskb_may_pull(skb, skb->len))
goto err; goto err;
else
skb->ip_summed = CHECKSUM_NONE;
len = slhc_uncompress(ppp->vj, skb->data + 2, skb->len - 2); len = slhc_uncompress(ppp->vj, skb->data + 2, skb->len - 2);
if (len <= 0) { if (len <= 0) {
...@@ -1690,6 +1692,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) ...@@ -1690,6 +1692,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
kfree_skb(skb); kfree_skb(skb);
} else { } else {
skb_pull(skb, 2); /* chop off protocol */ skb_pull(skb, 2); /* chop off protocol */
skb_postpull_rcsum(skb, skb->data - 2, 2);
skb->dev = ppp->dev; skb->dev = ppp->dev;
skb->protocol = htons(npindex_to_ethertype[npi]); skb->protocol = htons(npindex_to_ethertype[npi]);
skb->mac.raw = skb->data; skb->mac.raw = skb->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment