Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183414
b: refs/heads/master
c: 1f3c880
h: refs/heads/master
v: v3
  • Loading branch information
Andy Gospodarek authored and David S. Miller committed Jan 4, 2010
1 parent c7bc270 commit d92374b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 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: 3a999e6eb5d277cd6a321dcda3fc43c3d9e4e4b8
refs/heads/master: 1f3c8804acba841b5573b953f5560d2683d2db0d
11 changes: 11 additions & 0 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2615,6 +2615,17 @@ static int bond_arp_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
unsigned char *arp_ptr;
__be32 sip, tip;

if (dev->priv_flags & IFF_802_1Q_VLAN) {
/*
* When using VLANS and bonding, dev and oriv_dev may be
* incorrect if the physical interface supports VLAN
* acceleration. With this change ARP validation now
* works for hosts only reachable on the VLAN interface.
*/
dev = vlan_dev_real_dev(dev);
orig_dev = dev_get_by_index_rcu(dev_net(skb->dev),skb->skb_iif);
}

if (!(dev->priv_flags & IFF_BONDING) || !(dev->flags & IFF_MASTER))
goto out;

Expand Down
2 changes: 2 additions & 0 deletions trunk/net/8021q/vlan_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
if (skb_bond_should_drop(skb))
goto drop;

skb->skb_iif = skb->dev->ifindex;
__vlan_hwaccel_put_tag(skb, vlan_tci);
skb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK);

Expand Down Expand Up @@ -85,6 +86,7 @@ vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
if (skb_bond_should_drop(skb))
goto drop;

skb->skb_iif = skb->dev->ifindex;
__vlan_hwaccel_put_tag(skb, vlan_tci);
skb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK);

Expand Down
20 changes: 17 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2495,12 +2495,26 @@ int netif_receive_skb(struct sk_buff *skb)
if (!skb)
goto out;

/*
* Make sure frames received on VLAN interfaces stacked on
* 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.
*/
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);
}

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)) {
if (ptype->type == type && (ptype->dev == null_or_orig ||
ptype->dev == skb->dev || ptype->dev == orig_dev)) {
if (pt_prev)
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = ptype;
Expand Down

0 comments on commit d92374b

Please sign in to comment.