From 3326a1803802aa4730d32304b003f50720996b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Wed, 16 Nov 2016 14:16:08 -0300 Subject: Linux-libre 4.8.8-gnu --- net/sched/act_vlan.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'net/sched/act_vlan.c') diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c index 691409de3..4ffc6c13a 100644 --- a/net/sched/act_vlan.c +++ b/net/sched/act_vlan.c @@ -36,6 +36,12 @@ static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a, bstats_update(&v->tcf_bstats, skb); action = v->tcf_action; + /* Ensure 'data' points at mac_header prior calling vlan manipulating + * functions. + */ + if (skb_at_tc_ingress(skb)) + skb_push_rcsum(skb, skb->mac_len); + switch (v->tcfv_action) { case TCA_VLAN_ACT_POP: err = skb_vlan_pop(skb); @@ -57,6 +63,9 @@ drop: action = TC_ACT_SHOT; v->tcf_qstats.drops++; unlock: + if (skb_at_tc_ingress(skb)) + skb_pull_rcsum(skb, skb->mac_len); + spin_unlock(&v->tcf_lock); return action; } -- cgit v1.2.3