]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched fix: reclassification needs to consider ether protocol changes
authorJamal Hadi Salim <jhs@mojatatu.com>
Thu, 18 Feb 2016 12:38:04 +0000 (07:38 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2016 16:14:19 +0000 (11:14 -0500)
commita1289589a8c48554064f30a4434fa618f9d6de4f
tree7d0d02fb0e21601e637a698224d080269949e300
parent12122de4fa8ea7b6958aa890b800357d390b2dbe
net_sched fix: reclassification needs to consider ether protocol changes

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: 12dce365b87a ("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>
net/sched/sch_api.c