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

[pd] deprecate old prefixes in radvd configuration on DHCPv6 PD change #2701

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yangsong-cnyn
Copy link
Contributor

This PR addresses an issue where old prefixes were not being properly deprecated in the RADVD configuration when the upstream interface's delegated prefix changed. Previously, only the new prefix would be advertised, potentially leading to issues for OT still using the old prefix.

Now, upon a new PD message, dhcpcd.enter-hook will:

  • Identify the old and new prefixes: It retrieves the old and new prefix information from the dhcpcd environment variables.

  • Configure radvd to deprecate the old prefix: If an old prefix exists and is different from the new prefix, the radvd.conf file is updated to include the old prefix with a preferred and valid lifetime of 0. This signals to OT that the prefix is deprecated and should no longer be used.

  • Publish the new prefix: The new prefix is added to radvd.conf with the appropriate lifetimes received from the DHCPv6 server.

  • Reload radvd: The radvd service is reloaded to apply the changes.

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.29%. Comparing base (2b41187) to head (b6fb0f4).
Report is 941 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2701       +/-   ##
===========================================
- Coverage   55.77%   43.29%   -12.49%     
===========================================
  Files          87      108       +21     
  Lines        6890    13400     +6510     
  Branches        0      963      +963     
===========================================
+ Hits         3843     5801     +1958     
- Misses       3047     7291     +4244     
- Partials        0      308      +308     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant