From f0c110ecc4b8b04e1bbf6766284d3bf52cd73a30 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Tue, 11 Oct 2016 22:09:08 +0200 Subject: 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 Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- kernel/net/sched/em_ipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/net/sched') diff --git a/kernel/net/sched/em_ipset.c b/kernel/net/sched/em_ipset.c index bc1a2f1..87b8419 100644 --- a/kernel/net/sched/em_ipset.c +++ b/kernel/net/sched/em_ipset.c @@ -77,7 +77,7 @@ static int em_ipset_match(struct sk_buff *skb, struct tcf_ematch *em, struct net_device *dev, *indev = NULL; int ret, network_offset; - switch (skb->protocol) { + switch (tc_skb_protocol(skb)) { case htons(ETH_P_IP): acpar.family = NFPROTO_IPV4; if (!pskb_network_may_pull(skb, sizeof(struct iphdr))) -- cgit v1.2.3