Re: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-29 Thread Herbert Xu
On Tue, Nov 27, 2007 at 04:02:19PM +0900, Joonwoo Park wrote:
> 
> [NET]: Fix TX bug VLAN in VLAN
> Fix misbehavior of vlan_dev_hard_start_xmit() for recursive encapsulations.
> 
> Signed-off-by: Joonwoo Park <[EMAIL PROTECTED]>

Applied to net-2.6.  Thanks!
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-29 Thread Herbert Xu
On Tue, Nov 27, 2007 at 04:02:19PM +0900, Joonwoo Park wrote:
 
 [NET]: Fix TX bug VLAN in VLAN
 Fix misbehavior of vlan_dev_hard_start_xmit() for recursive encapsulations.
 
 Signed-off-by: Joonwoo Park [EMAIL PROTECTED]

Applied to net-2.6.  Thanks!
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-26 Thread Joonwoo Park
2007/11/27, Herbert Xu <[EMAIL PROTECTED]>:
> On Tue, Nov 27, 2007 at 02:32:49PM +0900, Joonwoo Park wrote:
> >
> > Thanks Herbert.
> > Well.. I think patch would work propely for AF_PACKET also.
> > (I did not insert BUG() macro in my patch)
> > How do you think?
> 
> Are you sure? I thought you need to check both in the xmit function.
> That is,
> 
>if (veth->h_vlan_proto != htons(ETH_P_8021Q) ||
>VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR) {
> 
> Otherwise you'll miss AF_PACKET packets when REORDER is off.

Thanks Herbert!
I agree with you.

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 <[EMAIL PROTECTED]>

---
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 7a36878..4f99bb8 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -462,7 +462,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;
 
---

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-26 Thread Herbert Xu
On Tue, Nov 27, 2007 at 02:32:49PM +0900, Joonwoo Park wrote:
> 
> Thanks Herbert.
> Well.. I think patch would work propely for AF_PACKET also.
> (I did not insert BUG() macro in my patch)
> How do you think?

Are you sure? I thought you need to check both in the xmit function.
That is,

if (veth->h_vlan_proto != htons(ETH_P_8021Q) ||
VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR) {

Otherwise you'll miss AF_PACKET packets when REORDER is off.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-26 Thread Joonwoo Park
2007/11/26, Herbert Xu <[EMAIL PROTECTED]>:
> On Fri, Nov 23, 2007 at 12:12:52PM +, Joonwoo Park wrote:
> > 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.
>
> Yes, AF_PACKET would do that.  So you should check both.
>

Thanks Herbert.
Well.. I think patch would work propely for AF_PACKET also.
(I did not insert BUG() macro in my patch)
How do you think?

Thanks
Joonwoo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-26 Thread Herbert Xu
On Fri, Nov 23, 2007 at 12:12:52PM +, Joonwoo Park wrote:
> 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.

Yes, AF_PACKET would do that.  So you should check both.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-26 Thread Herbert Xu
On Fri, Nov 23, 2007 at 12:12:52PM +, Joonwoo Park wrote:
 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.

Yes, AF_PACKET would do that.  So you should check both.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-26 Thread Joonwoo Park
2007/11/26, Herbert Xu [EMAIL PROTECTED]:
 On Fri, Nov 23, 2007 at 12:12:52PM +, Joonwoo Park wrote:
  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.

 Yes, AF_PACKET would do that.  So you should check both.


Thanks Herbert.
Well.. I think patch would work propely for AF_PACKET also.
(I did not insert BUG() macro in my patch)
How do you think?

Thanks
Joonwoo
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-26 Thread Herbert Xu
On Tue, Nov 27, 2007 at 02:32:49PM +0900, Joonwoo Park wrote:
 
 Thanks Herbert.
 Well.. I think patch would work propely for AF_PACKET also.
 (I did not insert BUG() macro in my patch)
 How do you think?

Are you sure? I thought you need to check both in the xmit function.
That is,

if (veth-h_vlan_proto != htons(ETH_P_8021Q) ||
VLAN_DEV_INFO(dev)-flags  VLAN_FLAG_REORDER_HDR) {

Otherwise you'll miss AF_PACKET packets when REORDER is off.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] [NET]: Fix TX bug VLAN in VLAN

2007-11-26 Thread Joonwoo Park
2007/11/27, Herbert Xu [EMAIL PROTECTED]:
 On Tue, Nov 27, 2007 at 02:32:49PM +0900, Joonwoo Park wrote:
 
  Thanks Herbert.
  Well.. I think patch would work propely for AF_PACKET also.
  (I did not insert BUG() macro in my patch)
  How do you think?
 
 Are you sure? I thought you need to check both in the xmit function.
 That is,
 
if (veth-h_vlan_proto != htons(ETH_P_8021Q) ||
VLAN_DEV_INFO(dev)-flags  VLAN_FLAG_REORDER_HDR) {
 
 Otherwise you'll miss AF_PACKET packets when REORDER is off.

Thanks Herbert!
I agree with you.

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 [EMAIL PROTECTED]

---
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 7a36878..4f99bb8 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -462,7 +462,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;
 
---

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/