]> err.no Git - linux-2.6/commitdiff
[NET] snap: needs hardware checksum fix
authorStephen Hemminger <shemminger@osdl.org>
Fri, 3 Feb 2006 00:53:26 +0000 (16:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Feb 2006 00:53:26 +0000 (16:53 -0800)
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 <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/802/psnap.c

index 4d638944d933bf971c7750425474dfd3079360eb..34e42968b477d9291a1671dfa32a43af77b7a74c 100644 (file)
@@ -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;