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/nat: support IPv6 NAT #104836

Merged
merged 1 commit into from Dec 1, 2020
Merged

nixos/nat: support IPv6 NAT #104836

merged 1 commit into from Dec 1, 2020

Conversation

ncfavier
Copy link
Member

@ncfavier ncfavier commented Nov 25, 2020

Motivation for this change

This is a revival of half of #6208, because I need to use NAT with IPv6 (yes, there are edge cases).

I tested the module manually on my server (including forwardPorts and loopbackIPs, both v4 and v6), everything seems to work fine.

I didn't add an IPv6 version of dmzHost, but it would be trivial to add if needed.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ncfavier
Copy link
Member Author

(I guess I should ping @edolstra @valeriangalliat @volth @ryantrinkle)

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

Other than the one comment, this looks good to me!

nixos/modules/services/networking/nat.nix Outdated Show resolved Hide resolved
@ncfavier
Copy link
Member Author

Done!

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

Nice, now I think squashing the commits is the only thing needed.

@ncfavier
Copy link
Member Author

Feel free to squash on merge.

@infinisil
Copy link
Member

infinisil commented Nov 30, 2020

I'd appreciate for PR authors to squash the commits themselves because:

  • If the change doesn't make sense as a single commit, the GitHub squash button can't be used
  • It maintains the original SHA1 (making cherry-picking of PR's easier) and potential PGP signature of the PR author

While this may not all apply to this specific PR, I think it's still valuable to be comfortable with git rebaseing and push -fing for the future when it does apply.

@ncfavier
Copy link
Member Author

ncfavier commented Nov 30, 2020

Noted, and done!

EDIT: actually, I'm not sure what you mean by "it maintains the original SHA1". Squashing more than one commit together creates a new commit with a new SHA1.

@infinisil
Copy link
Member

It does create a new commit on master, but the PR still shows the original git hashes. So if you wanted to cherry-pick a PR by copying a git hash from the PR's commits, that wouldn't work when it was squashed.

@ncfavier
Copy link
Member Author

ncfavier commented Dec 1, 2020

Ah, I see, thanks.

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