mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
can: dev: fix missing CAN XL support in can_put_echo_skb()
[ Upstream commit6bffdc38f9] 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:fb08cba12b("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c9abef1e07
commit
e90cefcffd
@@ -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 */
|
/* check flag whether this packet has to be looped back */
|
||||||
if (!(dev->flags & IFF_ECHO) ||
|
if (!(dev->flags & IFF_ECHO) ||
|
||||||
(skb->protocol != htons(ETH_P_CAN) &&
|
(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);
|
kfree_skb(skb);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user