Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228166
b: refs/heads/master
c: 2f16467
h: refs/heads/master
v: v3
  • Loading branch information
Marek Lindner authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent 825e630 commit f58bc1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: 4f26559156eae1b616ef2d0d168bd25f493e02f4
refs/heads/master: 2f1646788f4d3cd2ce5cb24d13096afbd8782665
14 changes: 10 additions & 4 deletions trunk/drivers/staging/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,15 @@ void interface_rx(struct net_device *soft_iface,
struct bat_priv *priv = netdev_priv(soft_iface);

/* check if enough space is available for pulling, and pull */
if (!pskb_may_pull(skb, hdr_size)) {
kfree_skb(skb);
return;
}
if (!pskb_may_pull(skb, hdr_size))
goto dropped;

skb_pull_rcsum(skb, hdr_size);
/* skb_set_mac_header(skb, -sizeof(struct ethhdr));*/

/* skb->dev & skb->pkt_type are set here */
if (unlikely(!pskb_may_pull(skb, ETH_HLEN)))
goto dropped;
skb->protocol = eth_type_trans(skb, soft_iface);

/* should not be neccesary anymore as we use skb_pull_rcsum()
Expand All @@ -216,6 +217,11 @@ void interface_rx(struct net_device *soft_iface,
soft_iface->last_rx = jiffies;

netif_rx(skb);
return;

dropped:
kfree_skb(skb);
return;
}

#ifdef HAVE_NET_DEVICE_OPS
Expand Down

0 comments on commit f58bc1e

Please sign in to comment.