diff options
author | Oliver Hartkopp <socketcan@hartkopp.net> | 2023-05-06 20:45:15 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-05-15 22:24:46 +0200 |
commit | 6bffdc38f9935bae49f980448f3f6be2dada0564 (patch) | |
tree | 98b79db0f7840b3e0d041fa09ef10a35712ab6dc /drivers/net | |
parent | 1db080cbdbab28752bbb1c86d64daf96253a5da1 (diff) | |
download | linux-stable-6bffdc38f9935bae49f980448f3f6be2dada0564.tar.gz linux-stable-6bffdc38f9935bae49f980448f3f6be2dada0564.tar.bz2 linux-stable-6bffdc38f9935bae49f980448f3f6be2dada0564.zip |
can: dev: fix missing CAN XL support in can_put_echo_skb()
can_put_echo_skb() checks for the enabled IFF_ECHO flag and the
correct ETH_P type of the given skbuff. When implementing the CAN XL
support the new check for ETH_P_CANXL has been forgotten.
Fixes: fb08cba12b52 ("can: canxl: update CAN infrastructure for CAN XL frames")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20230506184515.39241-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/can/dev/skb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/can/dev/skb.c b/drivers/net/can/dev/skb.c index 241ec636e91f..f6d05b3ef59a 100644 --- a/drivers/net/can/dev/skb.c +++ b/drivers/net/can/dev/skb.c @@ -54,7 +54,8 @@ int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, /* check flag whether this packet has to be looped back */ if (!(dev->flags & IFF_ECHO) || (skb->protocol != htons(ETH_P_CAN) && - skb->protocol != htons(ETH_P_CANFD))) { + skb->protocol != htons(ETH_P_CANFD) && + skb->protocol != htons(ETH_P_CANXL))) { kfree_skb(skb); return 0; } |