Skip to content

Commit

Permalink
[NET] snap: needs hardware checksum fix
Browse files Browse the repository at this point in the history
The SNAP code pops off it's 5 byte header, but doesn't adjust
the checksum. This would cause problems when using device that
does IP over SNAP and hardware receive checksums.

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Stephen Hemminger authored and davem330 committed Feb 3, 2006
1 parent 1113a7e commit 42c5e15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/802/psnap.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev,
proto = find_snap_client(skb->h.raw);
if (proto) {
/* Pass the frame on. */
u8 *hdr = skb->data;
skb->h.raw += 5;
skb_pull(skb, 5);
skb_postpull_rcsum(skb, hdr, 5);
rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev);
} else {
skb->sk = NULL;
Expand Down

0 comments on commit 42c5e15

Please sign in to comment.