diff options
author | Jay Vosburgh <fubar@us.ibm.com> | 2005-03-31 04:38:15 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-03-31 04:38:15 -0800 |
commit | 841d26e7e026eb5197b8073a6bf3f530b9f7603b (patch) | |
tree | 5e742875754d29382efed87776430929c9895638 | |
parent | 824391a1a90c63ee28e62eb1e9c49981b103a975 (diff) | |
download | history-841d26e7e026eb5197b8073a6bf3f530b9f7603b.tar.gz |
[BONDING]: Do not drop non-VLAN traffic
Change the bonding driver to not drop non-VLAN traffic when a
VLAN is configured above it. Originally fixed by Olaf Kirch
<okir@suse.de>; I changed his patch slightly to update comments.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 96a870866ace7a..770e28f98fd532 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -793,29 +793,20 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr) * @skb: hw accel VLAN tagged skb to transmit * @slave_dev: slave that is supposed to xmit this skbuff * - * When the bond gets an skb to tarnsmit that is + * When the bond gets an skb to transmit that is * already hardware accelerated VLAN tagged, and it * needs to relay this skb to a slave that is not * hw accel capable, the skb needs to be "unaccelerated", * i.e. strip the hwaccel tag and re-insert it as part * of the payload. - * - * Assumption - once a VLAN device is created over the bond device, all - * packets are going to be hardware accelerated VLAN tagged since the IP - * binding is done over the VLAN device */ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev) { unsigned short vlan_id; - int res; if (!list_empty(&bond->vlan_list) && - !(slave_dev->features & NETIF_F_HW_VLAN_TX)) { - res = vlan_get_tag(skb, &vlan_id); - if (res) { - return -EINVAL; - } - + !(slave_dev->features & NETIF_F_HW_VLAN_TX) && + vlan_get_tag(skb, &vlan_id) == 0) { skb->dev = slave_dev; skb = vlan_put_tag(skb, vlan_id); if (!skb) { |