ipv6/nib: do not allocate an NCE for a prefix #20385
Open
+87
−51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
Motivated by the findings in #20371 I would propose this, to not allocate a dummy NCE without an IPv6 for a prefix in the prefix list. Previously the NCE was allocated to store the interface on which the prefix was received, but having an NCE without an address seems weird as NCEs are keyed by their IPv6 address.
If an NCE is only matched by interface, this creates ambiguity as you can imagine multiple neighbors can be present on the same interface.
The implemented approach here is to use the already present
flags
member in_nib_offl_entry_t
to encode the interface.It is the same as the
info
member in_nib_onl_entry_t
.CON: The interface information is duplicated for FT and DC entries as they require a real NCE which also stores the interface number.
Having a separate PL data structure would require bigger refactoring, I guess.
Testing procedure
Not really tested in a setup yet.
But at least the test which failed in #20371 with the provided fix to not treat
NULL
as "don't care" now succeeds.Issues/PRs references
#20371