mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
8021q: fix mac_len recomputation in vlan_untag()
[ Upstream commit 5316cf9a51
]
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>
This commit is contained in:
parent
97d5d32951
commit
2ab08687cf
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue