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/wireguard: add peer service to interface dependencies #62828

Merged
merged 1 commit into from Jun 9, 2019

Conversation

WilliButz
Copy link
Member

@WilliButz WilliButz commented Jun 7, 2019

Motivation for this change

Previously each oneshot peer service only ran once and was not
restarted together with the interface unit. Because of this,
defined peers were missing after restarting their corresponding
interface unit.

The issue should be easily reproducible:

[root@nixos]# wg show wg0
interface: wg0
  public key: <pubkey>
  private key: (hidden)
  listening port: 12345

peer: <peer-pubkey>
  endpoint: <endpoint>
  allowed ips: <allowed-ips>
  latest handshake: 1 second ago
  transfer: 2.25 KiB received, 708 B sent

[root@nixos]# systemctl stop wireguard-wg0.service

[root@nixos]# systemctl start wireguard-wg0.service

[root@nixos]# wg show wg0
interface: wg0
  public key: <pubkey>
  private key: (hidden)
  listening port: 12345
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

/cc @grahamc @fpletz

Previously each oneshot peer service only ran once and was not
restarted together with the interface unit. Because of this,
defined peers were missing after restarting their corresponding
interface unit.

Co-Authored-By: Franz Pletz <fpletz@fnordicwalking.de>
@fpletz fpletz requested a review from grahamc June 7, 2019 14:41
@fpletz fpletz added the 0.kind: regression Something that worked before working no longer label Jun 7, 2019
@WilliButz
Copy link
Member Author

@GrahamcOfBorg test wireguard

@aristidb aristidb merged commit f491e94 into NixOS:master Jun 9, 2019
@WilliButz WilliButz deleted the wireguard-fix-peer-service branch June 9, 2019 11:48
ryantrinkle pushed a commit to ryantrinkle/nixpkgs that referenced this pull request Aug 19, 2019
)

Previously each oneshot peer service only ran once and was not
restarted together with the interface unit. Because of this,
defined peers were missing after restarting their corresponding
interface unit.

Co-Authored-By: Franz Pletz <fpletz@fnordicwalking.de>
ryantrinkle pushed a commit that referenced this pull request Sep 18, 2019
Previously each oneshot peer service only ran once and was not
restarted together with the interface unit. Because of this,
defined peers were missing after restarting their corresponding
interface unit.

Co-Authored-By: Franz Pletz <fpletz@fnordicwalking.de>
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

3 participants