Peilin Ye
071729150b
net/sched: act_skbmod: Skip non-Ethernet packets
...
[ Upstream commit 727d6a8b7ef3d25080fad228b2c4a1d4da5999c6 ]
Currently tcf_skbmod_act() assumes that packets use Ethernet as their L2
protocol, which is not always the case. As an example, for CAN devices:
$ ip link add dev vcan0 type vcan
$ ip link set up vcan0
$ tc qdisc add dev vcan0 root handle 1: htb
$ tc filter add dev vcan0 parent 1: protocol ip prio 10 \
matchall action skbmod swap mac
Doing the above silently corrupts all the packets. Do not perform skbmod
actions for non-Ethernet packets.
Fixes: 86da71b573
("net_sched: Introduce skbmod action")
Reviewed-by: Cong Wang <cong.wang@bytedance.com >
Signed-off-by: Peilin Ye <peilin.ye@bytedance.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-07-28 14:35:40 +02:00
..
2021-07-19 09:44:51 +02:00
2020-09-24 19:46:21 -07:00
2020-09-24 19:46:21 -07:00
2020-09-24 19:46:21 -07:00
2021-07-25 14:36:19 +02:00
2020-10-05 18:40:01 -07:00
2020-09-24 19:46:21 -07:00
2020-10-05 18:40:01 -07:00
2020-09-24 19:46:21 -07:00
2020-09-24 19:46:21 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-09-24 19:46:21 -07:00
2020-12-03 11:13:37 -08:00
2020-09-24 19:46:21 -07:00
2020-09-24 19:46:21 -07:00
2020-09-24 19:46:21 -07:00
2020-09-24 19:46:21 -07:00
2020-09-24 19:46:21 -07:00
2020-09-24 19:46:21 -07:00
2021-07-28 14:35:40 +02:00
2020-10-20 21:10:41 -07:00
2021-07-14 16:56:19 +02:00
2021-07-19 09:44:40 +02:00
2020-01-27 10:51:43 +01:00
2020-01-27 10:51:43 +01:00
2019-05-30 11:26:32 -07:00
2020-08-04 13:49:43 -07:00
2021-05-19 10:12:53 +02:00
2020-01-27 10:51:43 +01:00
2020-06-19 12:53:30 -07:00
2020-03-16 01:59:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-02-01 12:25:06 -08:00
2021-07-28 14:35:38 +02:00
2020-09-28 18:48:42 -07:00
2020-07-13 17:20:40 -07:00
2019-05-30 11:26:32 -07:00
2020-07-03 14:34:53 -07:00
2020-07-03 14:34:53 -07:00
2020-07-03 14:34:53 -07:00
2020-02-29 21:27:02 -08:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-07-13 17:20:40 -07:00
2021-02-23 15:53:23 +01:00
2020-05-01 16:08:19 -07:00
2021-03-17 17:06:14 +01:00
2020-07-16 16:48:34 -07:00
2020-07-16 16:48:34 -07:00
2021-06-23 14:42:43 +02:00
2020-08-05 20:13:21 -07:00
2020-07-16 16:48:34 -07:00
2021-03-30 14:31:57 +02:00
2020-07-16 16:48:34 -07:00
2020-07-16 16:48:34 -07:00
2021-06-03 09:00:50 +02:00
2020-07-16 16:48:34 -07:00
2020-07-16 16:48:34 -07:00
2020-07-16 16:48:34 -07:00
2020-08-05 20:13:21 -07:00
2021-06-03 09:00:28 +02:00
2020-07-16 16:48:34 -07:00
2021-06-03 09:00:47 +02:00
2021-03-30 14:31:57 +02:00
2020-08-05 20:13:21 -07:00
2020-07-16 16:48:34 -07:00
2020-08-05 20:13:21 -07:00
2020-02-19 17:49:48 -08:00
2019-12-03 11:53:55 -08:00
2019-12-06 11:58:45 -08:00
2020-07-16 16:48:34 -07:00
2020-10-29 11:45:47 -07:00
2020-07-16 16:48:34 -07:00
2020-07-16 16:48:34 -07:00
2020-07-16 16:48:34 -07:00
2021-07-14 16:56:25 +02:00
2021-03-30 14:31:57 +02:00
2020-07-16 16:48:34 -07:00
2021-03-30 14:31:57 +02:00
2020-07-16 16:48:34 -07:00
2021-05-19 10:12:57 +02:00
2020-07-16 16:48:34 -07:00
2021-04-14 08:42:02 +02:00