-
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
Address registration handling inappropriate #15867
Comments
Some initial response without tracking the code you posted in detail for now:
I agree with that. This seems to be a bug.
Yes, it does. It is handled here RIOT/sys/net/gnrc/network_layer/ipv6/nib/_nib-6lr.c Lines 89 to 94 in 4509dc6
and here RIOT/sys/net/gnrc/network_layer/ipv6/nib/_nib-6lr.c Lines 61 to 65 in 4509dc6
The states provided here RIOT/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.h Lines 37 to 57 in 4509dc6
are mostly to provide additional states to the once that can be carried within the ARO, when handling the requesting ARO. If you have a proposal for a fix, feel free to provide a PR. |
@miri64 I initially wrote this bug report for the first case (which I looked into more extensively) and just assumed this was also a problem for the second case (which it seems is not true). My apologies for jumping to conclusions. Concerning the proposal for a fix, I think the way forward is up for interpretation, as RFC 6775 does not explicitly mention this case (i.e., no pre-existing NCE and an incoming ARO with Registration Lifetime of 0) and / or is vague at best. For example, RFC 6775 Section 6.5.3. says:
However, this has an ambiguous implicit meaning at best for the case wherein there is no pre-existing NCE. Do we ignore the NS altogether? Or do we simply return a NA with Status code = 0? And what would happen then in case of multi-hop DAD? For example, RFC 6775 Section 8.2.3. says:
Actually, sending a DAR in this case could make sense in case a node wants to know for some reason if an address is already in use but doesn't wish to register it. Then the 6LBR would return a duplicate address status code to the 6LR. However, this would only work if this case was handled synchronously (which does not really make sense if you look at RFC 6775) and the 6LR creates a Tentative NCE, even when the Registration Lifetime is zero. However, RFC 6775 Section 8.2. explicitly says:
From which I'd conclude that our case would be handled asynchronously anyway |
Yeah RFC 6775 is that often (it says e.g. also to send DARs directly to the 6LBR, but does not tell how to know the 6LBRs address; one could suspect to take the address from the ABRO, but as the ABRO is part of the optional multihop prefix dissemination we can not rely on always having that for the equally optional multihop address registration).
I'd say sending status code 0 is the right way to go. The implicit meaning of registration lifetime 0 is the sender of the NS saying "please delete my entry", so there should be a reply to that that the deletion was successful. If there is no pre-existing NCE, this would also mean to signal success, as a deletion of a non-existing item is still a successful deletion ;-).
If the node asks for the deletion of the entry it should also be deleted at the border router. So a DAR should be send to the 6LBR and a DAD signaling success returned, whether the DAD-table entry existed or not.
This is indeed confusing :-/ |
EXACTLY! What I do often is look at how you guys implemented it, or just look at RFC 8505 for how a they handle it there and then devise some in-between solution that is technically RFC 6775 compliant. Concerning the 6LBR addresses, it does indeed say that multi-hop context & prefix distribution is optional but can only be left out if the same functionality is provided by an out-of-scope mechanism. So supposedly, the 6LBR addresses are always available in some data structure that abstracts how they where obtained? |
RFC 8505 did not exist when I did this implementation, so if RFC 8505 provides a solution I would rather suggest to go with that. |
@miri64 At first glance it doesn't really provide any solutions but more careful examination is required. |
@miri64 Could you take another look? |
Description
There are a few situations wherein the default behavior of a 6LR for handling an incoming registration attempt (i.e., processing a valid NS + ARO and SLLAO) seems inappropriate. For example, when a 6LR receives a valid NS with an ARO and SLLAO, and the ARO's Registration Lifetime is zero but the 6LR finds no matching NCE in its neighbor cache, it would make sense to simply ignore the NS (this is however debatable). Instead, it seems that a NA is returned, but without an ARO. This behavior does not make sense in any case. If anything, when returning a NA in this case, it should at least contain an ARO with Status code 0, or a NA should not be sent in response at all. A similar problem occurs when a new NCE is to be created but the cache is full.
Steps to reproduce the issue
In a first step
_handle_nbr_sol()
is called when a NS arrives (line 310).Second,
_copy_and_handle_aro()
is called (line 994).That's where the issue lies. While the
if (aro != NULL)
branch evaluates asTrue
,_handle_aro()
shall return a status of_ADDR_REG_STATUS_IGNORE
but this case is not handled and hence_copy_and_handle_aro()
returns areply_aro
ofNULL
. Besides that, it's also weird that a cache full status code does not seem to exist and the same issue arises when a new entry does need to be created but it isn't because the cache is full. In that case the debug statement even explicitly says that no NA is sent in response but that does in fact happen, albeit without an ARO, again.For the rest of the flow, see following steps (in order)
line 159 of _nib-6ln.c
line 129 of _nib-6lr.c
line 1000 of nib.c
The text was updated successfully, but these errors were encountered: