|
@@ -37,6 +37,12 @@ static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a,
|
|
|
bstats_update(&v->tcf_bstats, skb);
|
|
bstats_update(&v->tcf_bstats, skb);
|
|
|
action = v->tcf_action;
|
|
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) {
|
|
switch (v->tcfv_action) {
|
|
|
case TCA_VLAN_ACT_POP:
|
|
case TCA_VLAN_ACT_POP:
|
|
|
err = skb_vlan_pop(skb);
|
|
err = skb_vlan_pop(skb);
|
|
@@ -83,6 +89,9 @@ drop:
|
|
|
action = TC_ACT_SHOT;
|
|
action = TC_ACT_SHOT;
|
|
|
v->tcf_qstats.drops++;
|
|
v->tcf_qstats.drops++;
|
|
|
unlock:
|
|
unlock:
|
|
|
|
|
+ if (skb_at_tc_ingress(skb))
|
|
|
|
|
+ skb_pull_rcsum(skb, skb->mac_len);
|
|
|
|
|
+
|
|
|
spin_unlock(&v->tcf_lock);
|
|
spin_unlock(&v->tcf_lock);
|
|
|
return action;
|
|
return action;
|
|
|
}
|
|
}
|