public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [NET]: Fix TX bug VLAN in VLAN
@ 2007-11-23 12:12 Joonwoo Park
  2007-11-26 11:26 ` Herbert Xu
  0 siblings, 1 reply; 6+ messages in thread
From: Joonwoo Park @ 2007-11-23 12:12 UTC (permalink / raw)
  To: netdev, linux-kernel; +Cc: davem, tristan_schmelcher, acme

This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=8766

Is it possible? 
BUG((veth->h_vlan_proto != htons(ETH_P_8021Q)) && !(VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR))
I'm afraid, queued packet before vconfig set_flag would do that.

Thanks.
Joonwoo


[NET]: Fix TX bug VLAN in VLAN
Fix misbehavior of vlan_dev_hard_start_xmit() for recursive encapsulations.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>

---
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 7a36878..3e34990 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -454,7 +454,9 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
 int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct net_device_stats *stats = vlan_dev_get_stats(dev);
+#ifdef VLAN_DEBUG
 	struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
+#endif
 
 	/* Handle non-VLAN frames if they are sent to us, for example by DHCP.
 	 *
@@ -462,7 +464,7 @@ 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 (VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR) {
 		int orig_headroom = skb_headroom(skb);
 		unsigned short veth_TCI;
 
---


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-29 11:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-23 12:12 [PATCH] [NET]: Fix TX bug VLAN in VLAN Joonwoo Park
2007-11-26 11:26 ` Herbert Xu
2007-11-27  5:32   ` Joonwoo Park
2007-11-27  6:38     ` Herbert Xu
2007-11-27  7:02       ` Joonwoo Park
2007-11-29 11:19         ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox