This is a note to let you know that I've just added the patch titled

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

to the 2.6.32-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary

The filename of the patch is:
     bonding-vlan-avoid-mangled-nas-on-slaves-without-vlan-tag-insertion.patch
and it can be found in the queue-2.6.32 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.32 longterm 
tree,
please let <[email protected]> know about it.


>From [email protected]  Wed Feb 16 13:57:51 2011
From: Ben Hutchings <[email protected]>
Date: Mon, 07 Feb 2011 19:20:55 +0000
Subject: bonding/vlan: Avoid mangled NAs on slaves without VLAN tag insertion
To: [email protected]
Cc: Jay Vosburgh <[email protected]>, David Miller <[email protected]>, 
[email protected]
Message-ID: <1297106455.4077.7.camel@bwh-desktop>

From: Ben Hutchings <[email protected]>

This is related to commit f88a4a9b65a6f3422b81be995535d0e69df11bb8
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: Ben Hutchings <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/net/bonding/bond_ipv6.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/drivers/net/bonding/bond_ipv6.c
+++ b/drivers/net/bonding/bond_ipv6.c
@@ -66,6 +66,13 @@ static void bond_na_send(struct net_devi
        };
        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_devi
        }
 
        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;


Patches currently in longterm-queue-2.6.32 which might be from 
[email protected] are

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to