You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite similar to the situation found earlier for ISO-TP sockets. If there is an attempt to read from an unbound socket, then the call will be blocked indefinitely because of course there will not be any messages received when the socket is not bound to an interface.
My suggestion is that we return an error when a read, recv, etc. is attempted on an unbound socket as it is certainly an error on the application programmer's part.
Yes. Makes sense for CAN_RAW and for the 'unconnected/unbound' CAN_BCM socket too.
At least better than "Learning by pain" (here: loss of lifetime)
:-D
Will add Reported-by/Suggested-by tags for you. Thx!
This is quite similar to the situation found earlier for ISO-TP sockets. If there is an attempt to read from an unbound socket, then the call will be blocked indefinitely because of course there will not be any messages received when the socket is not bound to an interface.
My suggestion is that we return an error when a
read
,recv
, etc. is attempted on an unbound socket as it is certainly an error on the application programmer's part.Somewhere in
raw_recvmsg
we could add a "is socket bound" check: https://elixir.bootlin.com/linux/latest/source/net/can/raw.c#L843The text was updated successfully, but these errors were encountered: