Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183435
b: refs/heads/master
c: ca8d9ea
h: refs/heads/master
i:
  183433: be9b2e8
  183431: 83dbb34
v: v3
  • Loading branch information
Andy Gospodarek authored and David S. Miller committed Jan 7, 2010
1 parent 906678a commit c6ec5be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: d160439e7753aa19092bb12d8f4c6c918f8267e0
refs/heads/master: ca8d9ea30bc79b2965a1d169dcb2f48f02af4d2d
11 changes: 5 additions & 6 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2430,6 +2430,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;
struct net_device *null_or_bond;
int ret = NET_RX_DROP;
__be16 type;

Expand Down Expand Up @@ -2500,21 +2501,19 @@ int netif_receive_skb(struct sk_buff *skb)
* bonding interfaces still make their way to any base bonding
* device that may have registered for a specific ptype. The
* handler may have to adjust skb->dev and orig_dev.
*
* null_or_orig can be overloaded since it will not be set when
* using VLANs on top of bonding. Putting it here prevents
* disturbing the ptype_all handlers above.
*/
null_or_bond = NULL;
if ((skb->dev->priv_flags & IFF_802_1Q_VLAN) &&
(vlan_dev_real_dev(skb->dev)->priv_flags & IFF_BONDING)) {
null_or_orig = vlan_dev_real_dev(skb->dev);
null_or_bond = vlan_dev_real_dev(skb->dev);
}

type = skb->protocol;
list_for_each_entry_rcu(ptype,
&ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) {
if (ptype->type == type && (ptype->dev == null_or_orig ||
ptype->dev == skb->dev || ptype->dev == orig_dev)) {
ptype->dev == skb->dev || ptype->dev == orig_dev ||
ptype->dev == null_or_bond)) {
if (pt_prev)
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = ptype;
Expand Down

0 comments on commit c6ec5be

Please sign in to comment.