• Toshiaki Makita's avatar
    vlan: Fix out of order vlan headers with reorder header off · cbe7128c
    Toshiaki Makita authored
    With reorder header off, received packets are untagged in skb_vlan_untag()
    called from within __netif_receive_skb_core(), and later the tag will be
    inserted back in vlan_do_receive().
    
    This caused out of order vlan headers when we create a vlan device on top
    of another vlan device, because vlan_do_receive() inserts a tag as the
    outermost vlan tag. E.g. the outer tag is first removed in skb_vlan_untag()
    and inserted back in vlan_do_receive(), then the inner tag is next removed
    and inserted back as the outermost tag.
    
    This patch fixes the behaviour by inserting the inner tag at the right
    position.
    Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    cbe7128c
vlan_core.c 8.69 KB