Thread (8 messages) 8 messages, 3 authors, 2021-03-25

Breaking UAPI change?

From: Richard Weinberger <richard@nod.at>
Date: 2021-03-24 15:37:27

Hi!

commit f5223e9eee65 ("can: extend sockaddr_can to include j1939 members") increased the size of 
struct sockaddr_can.
This is a problem for applications which use recvfrom() with addrlen being sizeof(struct sockaddr_can)
or sizeof(struct sockaddr).
If such an application was built before the change it will no longer function correctly on newer kernels.
In fact I ran into such a scenario and found the said commit later that day.

Is this a known issue?
Or is this allowed and application must not use sizeof(struct sockaddr_can) as addrlen?
If so, what is the proposed way to avoid future breakage?

Thanks,
//richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help