-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sock_udp_send() reports success even though the message was never sent #11551
Comments
Due to the asynchronous nature of GNRC this is deactivated by default. There is however the poorly utilized, poorly tested and poorly documented |
I'm wondering if we should consider this issue as 'solved' or feature request. Personally I've never used the |
At the very least the documentation should be updated. For the case that the destination is unknown and the packet was therefore dropped without being written to the network, I would have expected to get |
something like this?
|
The first two sentences are good, the third assumes GNRC as the backend, which in the general doc is a no-go. |
Description
When sending the first message to a host with
sock_udp_send()
, the function will report the number of byes sent, indicating success. But in reality the packet never reached the device driver - it was silently dropped by the IPv6 layer with no error being propagated. (unless youENABLE_DEBUG
is set ingnrc_ipv6.c
- then a debug message is printed)Steps to reproduce the issue
Expected results
Either
res < 0
and the message failed to be send, orres == 6
and the message is being sent.Actual results
res == 6
, the message is not being sent.When tracing the packet through the network stack it becomes evident that it is dropped in
_send_unicast()
:no link-layer address or interface for next hop to de71:c105::1
.The Address is subsequently resolved:
However,
_send_unicast
does not return an error and theGNRC_NETAPI_MSG_TYPE_SND
case will not report an error to the upper layer.My current hack around this is to send a dummy message after startup, but this is of course not a very nice solution.
Versions
RIOT 2019.04
The text was updated successfully, but these errors were encountered: