]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
vlan: reset headers on accel emulation path
authorJiri Pirko <jpirko@redhat.com>
Fri, 19 Aug 2011 04:29:27 +0000 (21:29 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:40:55 +0000 (11:40 -0700)
[ Upstream commit c5114cd59d2664f258b0d021d79b1532d94bdc2b ]

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 <mike.auty@gmail.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/8021q/vlan_core.c

index fcc684678af67e644c6cc043dacee9f4159fb5b4..27263fb15642d884622c0567557aea45bc292020 100644 (file)
@@ -171,6 +171,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: