diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-12-13 03:20:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-16 15:43:22 -0500 |
commit | f88a4a9b65a6f3422b81be995535d0e69df11bb8 (patch) | |
tree | 7b9875784d13030b70a0f55219afa97de437b051 /drivers | |
parent | ffa95ed50f9fb2d8faaa6bd73086a7056ea46a06 (diff) |
bonding/vlan: Fix mangled NAs on slaves without VLAN tag insertion
bond_na_send() attempts to insert a VLAN tag in between building and
sending packets of the respective formats. If the slave does not
implement hardware VLAN tag insertion then vlan_put_tag() will mangle
the network-layer header because the Ethernet header is not present at
this point (unlike in bond_arp_send()).
Fix this by adding the tag out-of-line and relying on
dev_hard_start_xmit() to insert it inline if necessary.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Reviewed-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/bond_ipv6.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_ipv6.c b/drivers/net/bonding/bond_ipv6.c index 121b073a6c3f..84fbd4ebd778 100644 --- a/drivers/net/bonding/bond_ipv6.c +++ b/drivers/net/bonding/bond_ipv6.c | |||
@@ -88,7 +88,12 @@ static void bond_na_send(struct net_device *slave_dev, | |||
88 | } | 88 | } |
89 | 89 | ||
90 | if (vlan_id) { | 90 | if (vlan_id) { |
91 | skb = vlan_put_tag(skb, vlan_id); | 91 | /* The Ethernet header is not present yet, so it is |
92 | * too early to insert a VLAN tag. Force use of an | ||
93 | * out-of-line tag here and let dev_hard_start_xmit() | ||
94 | * insert it if the slave hardware can't. | ||
95 | */ | ||
96 | skb = __vlan_hwaccel_put_tag(skb, vlan_id); | ||
92 | if (!skb) { | 97 | if (!skb) { |
93 | pr_err("failed to insert VLAN tag\n"); | 98 | pr_err("failed to insert VLAN tag\n"); |
94 | return; | 99 | return; |