Skip to content

Commit ced84ca

Browse files
committed
can-isotp: fix CAN_REQUIRED_SIZE argument
In fact we need to take care to get the tp related values for rx_id and tx_id and not only the can_ifindex. Signed-off-by: Oliver Hartkopp <[email protected]>
1 parent fbed98a commit ced84ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/can/isotp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ static int isotp_bind(struct socket *sock, struct sockaddr *uaddr, int len)
10971097
int notify_enetdown = 0;
10981098

10991099
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
1100-
if (len < CAN_REQUIRED_SIZE(*addr, can_ifindex))
1100+
if (len < CAN_REQUIRED_SIZE(struct sockaddr_can, can_addr.tp))
11011101
#else
11021102
if (len < sizeof(*addr))
11031103
#endif

0 commit comments

Comments
 (0)