net: sched: fix skb->protocol use in case of accelerated vlan path
tc code implicitly considers skb->protocol even in case of accelerated vlan paths and expects vlan protocol type here. However, on rx path, if the vlan header was already stripped, skb->protocol contains value of next header. Similar situation is on tx path. So for skbs that use skb->vlan_tci for tagging, use skb->vlan_proto instead. Reported-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8bdda5ddd1
commit
d8b9605d26
@@ -242,8 +242,8 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res,
|
||||
char haddr[MAX_ADDR_LEN];
|
||||
|
||||
neigh_ha_snapshot(haddr, n, dev);
|
||||
err = dev_hard_header(skb, dev, ntohs(skb->protocol), haddr,
|
||||
NULL, skb->len);
|
||||
err = dev_hard_header(skb, dev, ntohs(tc_skb_protocol(skb)),
|
||||
haddr, NULL, skb->len);
|
||||
|
||||
if (err < 0)
|
||||
err = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user