Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108002
b: refs/heads/master
c: 0d7a368
h: refs/heads/master
v: v3
  • Loading branch information
Joe Eykholt authored and Jeff Garzik committed Aug 7, 2008
1 parent cd747ae commit c4aa9c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: cc9bd5cebc0825e0fabc0186ab85806a0891104f
refs/heads/master: 0d7a3681232f545c6a59f77e60f7667673ef0e93
15 changes: 8 additions & 7 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2165,6 +2165,7 @@ int netif_receive_skb(struct sk_buff *skb)
{
struct packet_type *ptype, *pt_prev;
struct net_device *orig_dev;
struct net_device *null_or_orig;
int ret = NET_RX_DROP;
__be16 type;

Expand All @@ -2178,13 +2179,13 @@ int netif_receive_skb(struct sk_buff *skb)
if (!skb->iif)
skb->iif = skb->dev->ifindex;

null_or_orig = NULL;
orig_dev = skb->dev;
if (orig_dev->master) {
if (skb_bond_should_drop(skb)) {
kfree_skb(skb);
return NET_RX_DROP;
}
skb->dev = orig_dev->master;
if (skb_bond_should_drop(skb))
null_or_orig = orig_dev; /* deliver only exact match */
else
skb->dev = orig_dev->master;
}

__get_cpu_var(netdev_rx_stat).total++;
Expand All @@ -2209,7 +2210,7 @@ int netif_receive_skb(struct sk_buff *skb)
#endif

list_for_each_entry_rcu(ptype, &ptype_all, list) {
if (!ptype->dev || ptype->dev == skb->dev) {
if (ptype->dev == null_or_orig || ptype->dev == skb->dev) {
if (pt_prev)
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = ptype;
Expand All @@ -2234,7 +2235,7 @@ int netif_receive_skb(struct sk_buff *skb)
list_for_each_entry_rcu(ptype,
&ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) {
if (ptype->type == type &&
(!ptype->dev || ptype->dev == skb->dev)) {
(ptype->dev == null_or_orig || ptype->dev == skb->dev)) {
if (pt_prev)
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = ptype;
Expand Down

0 comments on commit c4aa9c3

Please sign in to comment.