Commit 58ce8fab authored by Ben Hutchings's avatar Ben Hutchings Committed by Greg Kroah-Hartman

bonding/vlan: Avoid mangled NAs on slaves without VLAN tag insertion

This is related to commit f88a4a9b
upstream, but the bug cannot be properly fixed without the other
changes to VLAN tagging in 2.6.37.

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()).
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c8fd4409
......@@ -66,6 +66,13 @@ static void bond_na_send(struct net_device *slave_dev,
};
struct sk_buff *skb;
/* The Ethernet header is built in ndisc_send_skb(), not
* ndisc_build_skb(), so we cannot insert a VLAN tag. Only an
* out-of-line tag inserted by the hardware will work.
*/
if (vlan_id && !(slave_dev->features & NETIF_F_HW_VLAN_TX))
return;
icmp6h.icmp6_router = router;
icmp6h.icmp6_solicited = 0;
icmp6h.icmp6_override = 1;
......@@ -84,7 +91,7 @@ static void bond_na_send(struct net_device *slave_dev,
}
if (vlan_id) {
skb = vlan_put_tag(skb, vlan_id);
skb = __vlan_hwaccel_put_tag(skb, vlan_id);
if (!skb) {
pr_err(DRV_NAME ": failed to insert VLAN tag\n");
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment