-
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
gnrc_ndp_router: Initial import of router behavior of router discovery #3049
Conversation
Yes of course, sorry about that. |
I haven't managed to get this working yet, mainly because I don't know how the setup works, I suppose :s So I tried the following, as described by @kaspar030:
Adding the interface to the RIOT side worked fine. But the "do the opposite on the Linux side and make sure the tap is up" part is not quite clear to me. What interface do I have add the IPv6 address to? (I've tried this command:)
This will, however, result in ping6 not actually sending over the tap anything over the tap0 interface, which, due to the openvpn thingy, it should do if I've understood things correctly. Can anyone help me on what I have to do on the linux side to get things working? |
@x3ro if you want to configure your linux device as router you need to (a) install |
Mhm, but isn't a RIOT-RIOT test kind of... incomplete? Especially since we don't have a border router (yet!), an NDP implementation that doesn't play well with Linux could be a serious hindrance (it cost us many headaches with watr.li, at least ^^). Aaaaanyhow, I'm curious to see @x3ro s results. Fingers crossed! :) |
I'm not saying you should test it if you want to, for me it was just too much of a hassle. Linux responds to router advertisements, that was everything I tested :D |
d09e366
to
e4bd7c9
Compare
Rebased to current master |
Ah, I think I've misunderstood the scope of this PR. This does not respond to neighbour solicitations, right? |
Nope, that was #2910 |
Okay, but that one is merged and RIOT does not seem to be responding to the neighbour solicitations that Linux is sending to |
Also, when starting |
When we tested #2910 it worked and I tested it here to. Let me test it again, when I come home. Now that ng_nativenet is merged, it'll be a breeze :D |
e4bd7c9
to
684b377
Compare
Rebased to current master and squashed fixes. |
684b377
to
e0cbc08
Compare
Node hangs at |
Might be a locked mutex? |
Yepp. |
Got an idea or should I continue to debug? |
No I'm just commenting. Go on. |
For some reason https://github.com/RIOT-OS/RIOT/pull/3049/files#diff-f9bf85cb337616822921e4230ede1572R257 is not reached when adding the additional address (though it seems to work for the first (the link local) address). |
I guess it's because the router advertisement is sent from the same thread. |
Ah, of course. So we have to unlock it for a short moment there :/ |
Like diff --git a/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c b/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c
index 319f626..bd4403c 100644
--- a/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c
+++ b/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c
@@ -108,7 +108,9 @@ static ipv6_addr_t *_add_addr_to_entry(gnrc_ipv6_netif_t *entry, const ipv6_addr
if ((entry->flags & GNRC_IPV6_NETIF_FLAGS_ROUTER) &&
(entry->flags & GNRC_IPV6_NETIF_FLAGS_RTR_ADV)) {
entry->rtr_adv_count = GNRC_NDP_MAX_INIT_RTR_ADV_NUMOF;
+ mutex_unlock(&entry->mutex);
gnrc_ndp_router_retrans_rtr_adv(entry);
+ mutex_lock(&entry->mutex);
}
#endif
} ? |
Tell me what you think about my fixup (which I pushed while seeing your comment) |
You can squash immediately. Tested the diff successfully. |
fb2101d
to
ea505ce
Compare
Squashed. |
Now RPL seems to be not working any more. (Cannot ping any more.) |
Was maybe just a hickup. Seems to be working again. |
ACK, merge as soon as Travis green like the sky on Qo'noS. |
Welp, the goal of this PR wasn't certainly to make it stable (ad lib @emmanuelsearch "Get it done on sunday, don't test it; just get it done") ;-P |
Well, I would say that meant the additional features - the already working stuff shouldn't be broken. |
Yes of course, but when a new feature (router advertisements in this case) is destroying something, then already working stuff might fall victim, too. |
Whatever, I can confirm that my usual quick'n'dirty tests on IoT-LAB with 5 nodes and RPL are working. That should be good enough for now. |
You should have ACK'd with "MAJ!" then ;-P |
ea505ce
to
89c0b50
Compare
|
89c0b50
to
10e571d
Compare
Already fixed :-) |
gnrc_ndp_router: Initial import of router behavior of router discovery
This imports router behavior for NDP router discovery. This encompasses:
Depends on:
gnrc_ndp: add support for address-less link-layers #3628: address-less link-layer handling for NDP(merged)gnrc_ipv6_netif: prepare for router discovery #3745:(merged)gnrc_ipv6_netif
adaptations for router discoverygnrc_ndp_host: Initial import of host behavior of router discovery #3746: host-behavior for router discovery(merged)