diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-10-02 06:14:17 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-13 05:38:43 +0900 |
commit | 2ab08687cf48805c5abd0f9a785e09181eda9492 (patch) | |
tree | 0cb7d9dfdd3f2e6c27541151c414fe70896d054b /net/8021q | |
parent | 97d5d3295198279362552d9b810c088d3410da23 (diff) | |
download | linux-3.10-2ab08687cf48805c5abd0f9a785e09181eda9492.tar.gz linux-3.10-2ab08687cf48805c5abd0f9a785e09181eda9492.tar.bz2 linux-3.10-2ab08687cf48805c5abd0f9a785e09181eda9492.zip |
8021q: fix mac_len recomputation in vlan_untag()
[ Upstream commit 5316cf9a5197eb80b2800e1acadde287924ca975 ]
skb_reset_mac_len() relies on the value of the skb->network_header pointer,
therefore we must wait for such pointer to be recalculated before computing
the new mac_len value.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 4d39d802be2..f36463087ba 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c @@ -106,7 +106,6 @@ static struct sk_buff *vlan_reorder_header(struct sk_buff *skb) return NULL; memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN); skb->mac_header += VLAN_HLEN; - skb_reset_mac_len(skb); return skb; } @@ -140,6 +139,8 @@ struct sk_buff *vlan_untag(struct sk_buff *skb) skb_reset_network_header(skb); skb_reset_transport_header(skb); + skb_reset_mac_len(skb); + return skb; err_free: |