]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
can: isotp: isotp_setsockopt(): only allow to set low level TX flags for CAN-FD
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 18 Feb 2021 20:58:36 +0000 (21:58 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 16 Mar 2021 07:40:04 +0000 (08:40 +0100)
commite4912459bd5edd493b61bc7c3a5d9b2eb17f5a89
tree63014a47b280971b782c16f2b144821366ac1482
parent3a5ca857079ea022e0b1b17fc154f7ad7dbc150f
can: isotp: isotp_setsockopt(): only allow to set low level TX flags for CAN-FD

CAN-FD frames have struct canfd_frame::flags, while classic CAN frames
don't.

This patch refuses to set TX flags (struct
can_isotp_ll_options::tx_flags) on non CAN-FD isotp sockets.

Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol")
Link: https://lore.kernel.org/r/20210218215434.1708249-2-mkl@pengutronix.de
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/isotp.c