-
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
gcoap example request on tap I/F fails with NIB issue #8199
Comments
Hi @kb2ma, can you specify what your set-up is beyond that? Are you using the |
Wait, as far as I can see: you aren't providing the interface with the link-local local address. This is illegal in IPv6 and it was actually a bug in the old ND, that it was possible (and could possibly lead to problems in a multi-interface scenario with equal link-local addresses in the neighbors, say two different border routers configured as |
With the new NIB you always have to provide the interface with the link-local address (as you would do it also on e.g. Linux). |
Thanks for the quick response, Martine. I am using the gcoap example. The CoAP client is RIOT, and the server is libcoap on my Ubuntu workstation. I understand what you are saying with specification of the interface. When I specify this in the sock_udp_ep_t.netif member for the destination, the request works without the other additions I mentioned. So what is the recommended way to specify the interface? For my workstation tools, I would append a "%tapN" to the address. Does RIOT have this parsing yet in a string to address function? Is it time for a PR to this effect? |
Yes there is already a function for this in RIOT: |
Thanks for the recommendations. I'll try them out. I suggest also updating the README for the gnrc_networking example with these best practices. |
Could you maybe do that? I'm not really sure were to add this so a potential newcomer would see that immediately. |
The gcoap example README needs a similar update as well, so let me do that first. Then I'll see how that translates to gnrc_networking. |
@kb2ma can this issue be closed? |
We solved the main problem of use of link local addresses. However, we expanded that to an update of the gcoap and gnrc_networking READMEs to recommend (and I assume demonstrate) use of ULA/GUA. So I guess my answer is a question: How do we keep track of the suggestion to update the gcoap and gnrc_networking READMEs? Should there be some other issue that talks more generally about use of ULA/GUA and addressing in RIOT? I suggest we close this one and wait until someone is motivated enough to propose and get consensus on a simple, standard way to set up a ULA for development/testing. |
I'd like to mention that I'm facing the same issue between a Raspberry PI with 801.15.4 enabled and which is propagating an ULA prefix (
Then, when I try to get a CoAP resource on the board with aiocoap-client, I have the following message and the request hangs:
It works if I use:
By bisecting, I found that 55adbee is the culprit. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
I think this is still an issue, right? |
Thanks for raising this @kb2ma. I was pretty I commented somewhere about this issue but couldn't remember where :) |
I have found that a gcoap shell example request fails to send a message on the tap interface. The problem looks to be in the NIB module. I describe the problem below, and then show a workaround that hopefully will help the networking wizards understand what's amiss.
The transcript below shows a gcoap example request to the tap interface fails. I have turned on debug in nib.c.
I can get the request to work with two actions. First, in the shell, explicitly add the tap destination to the nib cache.
> nib neigh add 6 fe80::845e:22ff:fe47:a59f 86:5e:22:47:a5:9f
Second, update
gnrc_ipv6_nib_get_next_hop_l2addr()
to retain the generic_netif_t that it finds. gcoap creates the request with the SOCK_ADDR_ANY_NETIF netif. Just below the 'on_link()' test on l.188 in nib.c, I added this:Now the gcoap request succeeds as shown in the transcript below.
The text was updated successfully, but these errors were encountered: