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

nixos/systemd-networkd: add PREF64 related options #318604

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

jmbaur
Copy link
Contributor

@jmbaur jmbaur commented Jun 9, 2024

Description of changes

Tested to work in the legacy nested *Config format as well as the newer flattened format.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@flokli
Copy link
Contributor

flokli commented Jun 9, 2024

Is there a chance we can actually add a test for this?

@jmbaur
Copy link
Contributor Author

jmbaur commented Jun 9, 2024

Is there a chance we can actually add a test for this?

Sure thing! A functional test or a test that the config is what we expect?

@flokli
Copy link
Contributor

flokli commented Jun 10, 2024

Is there a chance we can actually add a test for this?

Sure thing! A functional test or a test that the config is what we expect?

I was thinking about a VM test with a "server" configuring such a prefix in their RA announcements, and a client with UsePREF64 set to true, then peeking at networkctl output to see it's there?

I didn't check but in case resolved already makes use of this information for AAAA record synthesis (or dnssec validation), doing a query for something with only a A record, and expecting to get back a synthesized record back could be tested too?

As far as sending any traffic is concerned, you could get some inspiration from our ipv6 prefix delegation test, but I assume we're still missing some CLAT in Linux?

@jmbaur
Copy link
Contributor Author

jmbaur commented Jun 11, 2024

@flokli So we do have a clatd test! I added a commit that augments that test to ensure the networkd options work as expected.

@jmbaur
Copy link
Contributor Author

jmbaur commented Jun 11, 2024

@ofborg test clatd

@flokli flokli requested a review from hax404 June 11, 2024 07:23
We can expose the PLAT prefix to the client via DNS64 so clatd is able
to determine the prefix dynamically. We can also test that some
systemd-networkd PREF64 settings work as expected when exposed on the
router.
Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

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

LGTM, but I'd like to give @hax404 a chance to also review the test additions.

@mweinelt mweinelt added the backport release-24.05 Backport PR automatically label Jun 12, 2024
@mweinelt
Copy link
Member

I think it is reasonable to backport this change, as it introduces the declarative interface for functionality present in systemd 255.

Copy link
Contributor

@hax404 hax404 left a comment

Choose a reason for hiding this comment

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

Very nice work!

@flokli flokli merged commit eabd9c3 into NixOS:master Jun 12, 2024
22 checks passed
Copy link
Contributor

Backport failed for release-24.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-24.05
git worktree add -d .worktree/backport-318604-to-release-24.05 origin/release-24.05
cd .worktree/backport-318604-to-release-24.05
git switch --create backport-318604-to-release-24.05
git cherry-pick -x b867cc215f2d01b25f478c6c711b5be9374c3dac d4d5fd718d3ef05b3f47750a6d5462a4e21c321c

@jmbaur jmbaur deleted the pref64-networkd branch June 12, 2024 19:39
@flokli
Copy link
Contributor

flokli commented Jun 12, 2024

@mweinelt please do the backport manually.

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

Successfully merging this pull request may close these issues.

None yet

4 participants