Skip to content
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/ipv6: Store all SLAAC prefixes #20757

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Conversation

xnumad
Copy link
Contributor

@xnumad xnumad commented Jun 21, 2024

Contribution description

In GNRC's architecture, lifetimes are associated with prefixes (and not to any addresses themselves). The prefixes from a PIO are stored in the prefix list. Even if a prefix is not on-link, it needs to be stored in the prefix list if the A flag (SLAAC) is set, so that auto configured addresses in the prefix have their lifetimes managed. Otherwise these addresses would remain configured possibly longer than what the prefix lifetimes were set for.

This PR stores the prefix in the prefix list as soon as / whenever the A flag is set. The test is modified accordingly.

Background: Generally, by RFC definition (https://datatracker.ietf.org/doc/html/rfc4861#section-5.1) the prefix list only contains on-link prefixes, but in GNRC, this is determined for a prefix list entry by the _PFX_ON_LINK flag.

Testing procedure

Receive a RA PIO with A flag but not L flag (e.g. 6LN host). Observe how autoconfigured addresses will not be deprecated and invalidated/removed when preferred resp. valid lifetime expire, since this prefix information is never stored anywhere.

@github-actions github-actions bot added Area: network Area: Networking Area: tests Area: tests and testing framework Area: sys Area: System labels Jun 21, 2024
@benpicco benpicco requested a review from fabian18 July 4, 2024 09:42
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 4, 2024
@riot-ci
Copy link

riot-ci commented Jul 4, 2024

Murdock results

✔️ PASSED

e250667 gnrc/ipv6: Store all SLAAC prefixes

Success Failures Total Runtime
10196 0 10196 17m:13s

Artifacts

@benpicco benpicco added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Jul 26, 2024
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explanation makes sense - do we still need the check for _multihop_p6c() then?

sys/net/gnrc/network_layer/ipv6/nib/nib.c Outdated Show resolved Hide resolved
Incl. off-link ones, since lifetimes for the autoconfigured addresses are managed by the prefix entry.
@benpicco benpicco enabled auto-merge July 29, 2024 14:06
@benpicco benpicco added this pull request to the merge queue Jul 29, 2024
Merged via the queue into RIOT-OS:master with commit 9781bc0 Jul 29, 2024
26 checks passed
xnumad added a commit to xnumad/RIOT that referenced this pull request Oct 17, 2024
Increases readability
Was previously also needed to enable regen to work on 6LN, because a 6LN did not store SLAAC prefix prior to PR RIOT-OS#20757.
@benpicco benpicco added this to the Release 2024.10 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants