[riot-notifications] [RIOT-OS/RIOT] gnrc/netif_bus: generate distinct events for global and link-local addresses (#15415)
notifications at github.com
Tue Nov 10 16:31:17 CET 2020
> TBH when I introduced this event, I only had global addresses in mind. Does it even make sense to generate events for when link-local addresses become valid? I'd be happy to just drop these.
In classic IPv6 link-local addresses are just normal addresses, so they need to do Duplicate Address Detection (DAD) when using SLAAC, so yes they can become valid. It's a special case, that they are assumed to be unique in 6Lo-ND (and only if they were generated from the EUI-64) and thus not in need of DAD. But given that they are just normal addresses to IPv6 introducing a distinct event for them seems weird to me.
> I can add a helper function instead, but I'd rather avoid receiving messages that I'm not interested in in the first place.
> If a thread has no message queue and the global address becomes valid right after the link-local one, that message might get lost.
That's the issue with classic IPC messages in general (even a queue can run full at some point)... I was wondering why you mimicked them instead of event queues for those buses, and assumed you did not care about messages potentially getting lost. However, assuming every interface has its own bus, global addresses becoming valid right after the link-local one should be a really rare case (if at all): Link-local addresses in SLAAC are configured when the interface comes up. Global addresses are configured on an incoming Router Advertisement with Prefix Information Option. Those can either come in as a periodic multicast message (which can generate the rare case, when the interface comes up right before that) or solicited with a Router Solicitation, which typically are only sent by a node after the node has a valid (link-local) address.
If you really want to be sure: can you check if a message made it on the bus or maybe repeat the validity event periodically?
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications