diff options
author | Vincent Mailhol <mailhol.vincent@wanadoo.fr> | 2022-06-10 23:30:09 +0900 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-06-11 17:11:02 +0200 |
commit | a6d190f8c7670068d8c154ef8477eca07b5e3574 (patch) | |
tree | 4271015a286269a3c526c3b71e9d2855e6c3546b /net/unix/sysctl_net_unix.c | |
parent | ccd8a9351f7b44bc1c0c8e4d39c0d6593b106fc4 (diff) | |
download | linux-a6d190f8c7670068d8c154ef8477eca07b5e3574.tar.gz linux-a6d190f8c7670068d8c154ef8477eca07b5e3574.tar.bz2 linux-a6d190f8c7670068d8c154ef8477eca07b5e3574.zip |
can: skb: drop tx skb if in listen only mode
Frames can be directly injected to a can driver via the packet
socket. By doing so, it is possible to reach the
net_device_ops::ndo_start_xmit function even if the driver is
configured in listen only mode.
Add a check in can_dropped_invalid_skb() to discard the skb if
CAN_CTRLMODE_LISTENONLY is set.
Link: https://lore.kernel.org/all/20220610143009.323579-8-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Acked-by: Max Staudt <max@enpas.org>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions