linux/drivers/net/can
Carlos Sanchez 24ee050bb9 can: slcan: allow reception of short error messages
commit ef0841e4cb upstream.

Allows slcan to receive short messages (typically errors) from the serial
interface.

When error support was added to slcan protocol in
b32ff46685 ("can: slcan: extend the protocol
with error info") the minimum valid message size changed from 5 (minimum
standard can frame tIII0) to 3 ("e1a" is a valid protocol message, it is
one of the examples given in the comments for slcan_bump_err() ), but the
check for minimum message length prodicating all decoding was not adjusted.
This makes short error messages discarded and error frames not being
generated.

This patch changes the minimum length to the new minimum (3 characters,
excluding terminator, is now a valid message).

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
Fixes: b32ff46685 ("can: slcan: extend the protocol with error info")
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://patch.msgid.link/20250520102305.1097494-1-carlossanchez@geotab.com
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-06-04 14:40:20 +02:00
..
c_can can: c_can: Use of_property_present() to test existence of DT property 2025-06-04 14:40:13 +02:00
cc770 can: cc770: cc770_isa_probe(): add missing free_cc770dev() 2022-11-24 16:09:53 +01:00
ctucanfd can: ctucanfd: handle skb allocation failure 2025-02-21 13:50:04 +01:00
dev can: dev: can_set_termination(): allow sleeping GPIOs 2024-12-14 19:54:32 +01:00
flexcan can: flexcan: disable transceiver during system PM 2025-03-28 21:59:00 +01:00
ifi_canfd can: ifi_canfd: ifi_canfd_handle_lec_err(): fix {rx,tx}_errors statistics 2024-12-14 19:54:19 +01:00
m_can can: mcan: m_can_class_unregister(): fix order of unregistration calls 2025-05-18 08:21:20 +02:00
mscan can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
peak_canfd can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
rcar can: rcar_canfd: Fix page entries in the AFL list 2025-03-28 21:59:00 +01:00
sja1000 can: sja1000: sja1000_err(): fix {rx,tx}_errors statistics 2024-12-14 19:54:20 +01:00
slcan can: slcan: allow reception of short error messages 2025-06-04 14:40:20 +02:00
softing can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
spi can: mcp251xfd: fix TDC setting for low data bit rates 2025-05-18 08:21:21 +02:00
usb can: ems_usb: ems_usb_rx_err(): fix {rx,tx}_errors statistics 2024-12-14 19:54:20 +01:00
at91_can.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
can327.c can: can327: flush TX_work on ldisc .close() 2022-12-07 10:32:36 +01:00
grcan.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
janz-ican3.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
Kconfig can: sun4i_can: Only show Kconfig if ARCH_SUNXI is set 2023-10-19 23:08:52 +02:00
kvaser_pciefd.c can: kvaser_pciefd: Set hardware timestamp on transmitted packets 2023-07-19 16:21:11 +02:00
Makefile can: slcan: move driver into separate sub directory 2022-07-03 11:34:44 +02:00
pch_can.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
sun4i_can.c can: sun4i_can: sun4i_can_err(): fix {rx,tx}_errors statistics 2024-12-14 19:54:20 +01:00
ti_hecc.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
vcan.c can: dev: add CAN XL support to virtual CAN 2022-09-15 09:08:09 +02:00
vxcan.c net: validate veth and vxcan peer ifindexes 2023-08-30 16:11:02 +02:00
xilinx_can.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00