Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222859
b: refs/heads/master
c: b6faaae
h: refs/heads/master
i:
  222857: 140063d
  222855: 4566006
v: v3
  • Loading branch information
Marek Lindner authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent fef2176 commit 49e5680
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: 9ee898739b7e4d292abed911008b3f91b442118a
refs/heads/master: b6faaae1a15a352d68b3e3cd8b840e56709820bf
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 49e5680

Please sign in to comment.