From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]:55029 "EHLO tama500.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbeCMGlJ (ORCPT ); Tue, 13 Mar 2018 02:41:09 -0400 From: Toshiaki Makita Subject: [PATCH net 0/2] Fix vlan untag and insertion for bridge and vlan with reorder_hdr off Date: Tue, 13 Mar 2018 14:51:26 +0900 Message-Id: <1520920288-2483-1-git-send-email-makita.toshiaki@lab.ntt.co.jp> To: "David S. Miller" Cc: Toshiaki Makita , netdev@vger.kernel.org, Brandon Carpenter , Vlad Yasevich Sender: netdev-owner@vger.kernel.org List-ID: As Brandon Carpenter reported[1], sending non-vlan-offloaded packets from bridge devices ends up with corrupted packets. He narrowed down this problem and found that the root cause is in skb_reorder_vlan_header(). While I was working on fixing this problem, I found that the function does not work properly for double tagged packets with reorder_hdr off as well. Patch 1 fixes these 2 problems in skb_reorder_vlan_header(). And it turned out that fixing skb_reorder_vlan_header() is not sufficient to receive double tagged packets with reorder_hdr off while I was testing the fix. Vlan tags got out of order when vlan devices with reorder_hdr disabled were stacked. Patch 2 fixes this problem. [1] https://www.spinics.net/lists/linux-ethernet-bridging/msg07039.html Toshiaki Makita (2): net: Fix vlan untag for bridge and vlan_dev with reorder_hdr off vlan: Fix out of order vlan headers with reorder header off include/linux/if_vlan.h | 66 +++++++++++++++++++++++++++++++++++-------- include/uapi/linux/if_ether.h | 1 + net/8021q/vlan_core.c | 4 +-- net/core/skbuff.c | 7 +++-- 4 files changed, 63 insertions(+), 15 deletions(-) -- 1.8.3.1