From 6b25b028af5f6a6ff0d96841f8679db60e0ffbe7 Mon Sep 17 00:00:00 2001 From: norly Date: Thu, 17 Mar 2022 21:14:59 +0100 Subject: [PATCH] Add can_dropped_invalid_skb() to elmcan_netdev_start_xmit() --- module/elmcan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/elmcan.c b/module/elmcan.c index 95a8206..9a58655 100644 --- a/module/elmcan.c +++ b/module/elmcan.c @@ -847,6 +847,9 @@ static netdev_tx_t elmcan_netdev_start_xmit(struct sk_buff *skb, struct elmcan *elm = netdev_priv(dev); struct can_frame *frame = (struct can_frame *)skb->data; + if (can_dropped_invalid_skb(dev, skb)) + return NETDEV_TX_OK; + /* BHs are already disabled, so no spin_lock_bh(). * See Documentation/networking/netdevices.txt */ -- 2.30.2