Skip to content

Commit

Permalink
vlan: reset headers on accel emulation path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Aug 19, 2011
1 parent 9331db4 commit c5114cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/8021q/vlan_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c5114cd

Please sign in to comment.