Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64205
b: refs/heads/master
c: d92a7db
h: refs/heads/master
i:
  64203: 70611d5
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Aug 22, 2007
1 parent 9442bd2 commit 716c85b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39dad26c37fdb1382e4173172a2704fa278f7fd6
refs/heads/master: d92a7db710c32db826a00ba9bc7a22e741d5041e
17 changes: 12 additions & 5 deletions trunk/net/802/psnap.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,28 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev,
.type = __constant_htons(ETH_P_SNAP),
};

if (unlikely(!pskb_may_pull(skb, 5)))
goto drop;

rcu_read_lock();
proto = find_snap_client(skb_transport_header(skb));
if (proto) {
/* Pass the frame on. */
skb->transport_header += 5;
skb_pull_rcsum(skb, 5);
rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev);
} else {
skb->sk = NULL;
kfree_skb(skb);
rc = 1;
}

rcu_read_unlock();

if (unlikely(!proto))
goto drop;

out:
return rc;

drop:
kfree_skb(skb);
goto out;
}

/*
Expand Down

0 comments on commit 716c85b

Please sign in to comment.