Skip to content

Commit e90cefc

Browse files
hartkoppgregkh
authored andcommitted
can: dev: fix missing CAN XL support in can_put_echo_skb()
[ Upstream commit 6bffdc3 ] 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: fb08cba ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c9abef1 commit e90cefc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/net/can/dev/skb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
5454
/* check flag whether this packet has to be looped back */
5555
if (!(dev->flags & IFF_ECHO) ||
5656
(skb->protocol != htons(ETH_P_CAN) &&
57-
skb->protocol != htons(ETH_P_CANFD))) {
57+
skb->protocol != htons(ETH_P_CANFD) &&
58+
skb->protocol != htons(ETH_P_CANXL))) {
5859
kfree_skb(skb);
5960
return 0;
6061
}

0 commit comments

Comments
 (0)