summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2016-02-18 07:38:04 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-03 15:07:07 -0800
commitd4775ea09519074dd41039a39dbcb589390ae08f (patch)
treea58e3dfc8ad34a4c9b687e16b527277d352940a1
parent26fd5ed6e8ad66c86eb720cf85d1230c9b45a5f9 (diff)
net_sched fix: reclassification needs to consider ether protocol changes
[ Upstream commit 619fe32640b4b01f370574d50344ae0f62689816 ] actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, will ask for the packet to be reclassified. We then need to restart the classification with the new proto header. Example setup used to catch this: sudo tc qdisc add dev $ETH ingress sudo $TC filter add dev $ETH parent ffff: pref 1 protocol 802.1Q \ u32 match u32 0 0 flowid 1:1 \ action vlan pop reclassify Fixes: 3b3ae880266d ("net: sched: consolidate tc_classify{,_compat}") Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/sched/sch_api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index b5c2cf2aa6d4..af1acf009866 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1852,6 +1852,7 @@ reset:
}
tp = old_tp;
+ protocol = tc_skb_protocol(skb);
goto reclassify;
#endif
}