Skip to content

Commit 6bffdc3

Browse files
hartkoppmarckleinebudde
authored andcommitted
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: fb08cba ("can: canxl: update CAN infrastructure for CAN XL frames") Signed-off-by: Oliver Hartkopp <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 1db080c commit 6bffdc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)