diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-10-02 02:14:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-02 22:45:57 -0400 |
commit | 5316cf9a5197eb80b2800e1acadde287924ca975 (patch) | |
tree | 1a36086347433ad7205d996cdd2713f28dc51933 /net/8021q | |
parent | 786fdf0bbf1c3a1b402bb2da946b93e0b36a8f32 (diff) |
8021q: fix mac_len recomputation in vlan_untag()
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>
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 b258da88f675..add69d0fd99d 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -105,7 +105,6 @@ static struct sk_buff *vlan_reorder_header(struct sk_buff *skb) | |||
105 | return NULL; | 105 | return NULL; |
106 | memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN); | 106 | memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN); |
107 | skb->mac_header += VLAN_HLEN; | 107 | skb->mac_header += VLAN_HLEN; |
108 | skb_reset_mac_len(skb); | ||
109 | return skb; | 108 | return skb; |
110 | } | 109 | } |
111 | 110 | ||
@@ -139,6 +138,8 @@ struct sk_buff *vlan_untag(struct sk_buff *skb) | |||
139 | 138 | ||
140 | skb_reset_network_header(skb); | 139 | skb_reset_network_header(skb); |
141 | skb_reset_transport_header(skb); | 140 | skb_reset_transport_header(skb); |
141 | skb_reset_mac_len(skb); | ||
142 | |||
142 | return skb; | 143 | return skb; |
143 | 144 | ||
144 | err_free: | 145 | err_free: |