Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194620
b: refs/heads/master
c: 47d2964
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed May 2, 2010
1 parent 597cfe0 commit ee40942
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 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: 43815482370c510c569fd18edb57afcb0fa8cab6
refs/heads/master: 47d29646a2c1c147d8a7598aeac2c87dd71ed638
5 changes: 5 additions & 0 deletions trunk/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,11 @@ static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len)
return skb->data += len;
}

static inline unsigned char *skb_pull_inline(struct sk_buff *skb, unsigned int len)
{
return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len);
}

extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta);

static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len)
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ EXPORT_SYMBOL(skb_push);
*/
unsigned char *skb_pull(struct sk_buff *skb, unsigned int len)
{
return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len);
return skb_pull_inline(skb, len);
}
EXPORT_SYMBOL(skb_pull);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ethernet/eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)

skb->dev = dev;
skb_reset_mac_header(skb);
skb_pull(skb, ETH_HLEN);
skb_pull_inline(skb, ETH_HLEN);
eth = eth_hdr(skb);

if (unlikely(is_multicast_ether_addr(eth->h_dest))) {
Expand Down

0 comments on commit ee40942

Please sign in to comment.