[patch net-2.6] vlan: reset headers on accel emulation path

Subsystems: networking [general], the rest

STALE5534d

3 messages, 3 authors, 2011-08-19 · open the first message on its own page

[patch net-2.6] vlan: reset headers on accel emulation path

From: Jiri Pirko <hidden>
Date: 2011-08-18 16:35:56

It's after all necessary to do reset headers here. The reason is we
cannot depend that it gets reseted in __netif_receive_skb once skb is
reinjected. For incoming vlanids without vlan_dev, vlan_do_receive()
returns false with skb != NULL and __netif_reveive_skb continues, skb is
not reinjected.

This might be good material for 3.0-stable as well

Reported-by: Mike Auty <redacted>
Signed-off-by: Jiri Pirko <redacted>

---
 net/8021q/vlan_core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 5f27f8e..f1f2f7b 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -167,6 +167,8 @@ struct sk_buff *vlan_untag(struct sk_buff *skb)
 	if (unlikely(!skb))
 		goto err_free;
 
+	skb_reset_network_header(skb);
+	skb_reset_transport_header(skb);
 	return skb;
 
 err_free:
-- 
1.7.6

Re: [patch net-2.6] vlan: reset headers on accel emulation path

From: Greg KH <gregkh@suse.de>
Date: 2011-08-18 18:25:28

On Thu, Aug 18, 2011 at 06:35:45PM +0200, Jiri Pirko wrote:
It's after all necessary to do reset headers here. The reason is we
cannot depend that it gets reseted in __netif_receive_skb once skb is
reinjected. For incoming vlanids without vlan_dev, vlan_do_receive()
returns false with skb != NULL and __netif_reveive_skb continues, skb is
not reinjected.

This might be good material for 3.0-stable as well
<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read Documentation/stable_kernel_rules.txt
for how to do this properly.

</formletter>

Re: [patch net-2.6] vlan: reset headers on accel emulation path

From: David Miller <davem@davemloft.net>
Date: 2011-08-19 04:31:02

From: Jiri Pirko <redacted>
Date: Thu, 18 Aug 2011 18:35:45 +0200
It's after all necessary to do reset headers here. The reason is we
cannot depend that it gets reseted in __netif_receive_skb once skb is
reinjected. For incoming vlanids without vlan_dev, vlan_do_receive()
returns false with skb != NULL and __netif_reveive_skb continues, skb is
not reinjected.

This might be good material for 3.0-stable as well

Reported-by: Mike Auty <redacted>
Signed-off-by: Jiri Pirko <redacted>
Applied and queued up for -stable, thanks Jiri!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help