[PATCH 0/2] can: drop tx skb if the device is in listen only mode

From: Vincent Mailhol
Date: Fri May 13 2022 - 10:24:24 EST


In listen only mode, tx CAN frames can still reach the driver if
injected via the packet socket. This series add a check toward
CAN_CTRLMODE_LISTENONLY in can_dropped_invalid_skb() to discard such
skb. The first patch does some preparation work and migrates
can_dropped_invalid_skb() from skb.h to dev.h. The second and last
patch is the actual change.

Vincent Mailhol (2):
can: move can_dropped_invalid_skb from skb.h to dev.h
can: dev: drop tx skb if in listen only mode

include/linux/can/dev.h | 35 +++++++++++++++++++++++++++++++++++
include/linux/can/skb.h | 28 ----------------------------
2 files changed, 35 insertions(+), 28 deletions(-)

--
2.35.1