]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
VLAN: Fix nested VLAN transmit bug
authorJoonwoo Park <joonwpark81@gmail.com>
Tue, 11 Dec 2007 01:39:35 +0000 (09:39 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 14 Dec 2007 17:51:06 +0000 (09:51 -0800)
[VLAN]: Fix nested VLAN transmit bug

[ Upstream commit: 6ab3b487db77fa98a24560f11a5a8e744b98d877 ]

Fix misbehavior of vlan_dev_hard_start_xmit() for recursive encapsulations.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/8021q/vlan_dev.c

index 328759c32d616195ff634ad12369667d16e4f80e..6f5e73869e6ba9d03a4634e8a72c917bfac9d51b 100644 (file)
@@ -459,7 +459,8 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
         * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs...
         */
 
-       if (veth->h_vlan_proto != htons(ETH_P_8021Q)) {
+       if (veth->h_vlan_proto != htons(ETH_P_8021Q) ||
+               VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR) {
                int orig_headroom = skb_headroom(skb);
                unsigned short veth_TCI;