-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
systemd credentials not working for multiple keys like private and preshaed key #365402
Labels
0.kind: bug
Something is broken
Comments
networkException
added a commit
to networkException/nixpkgs
that referenced
this issue
Dec 15, 2024
…ltiple keys per interface This patch fixes systemd credential loading for wireguard with networkd not working when specifying more than one credential per interface by properly flattening the resulting multidimensional list instead of falling back on string concat with a space. Resolves NixOS#365402
13 tasks
Can you test the changes from #365407? For example by specifying imports = [
./path/to/updated-module.nix
];
disabledModules = [
"services/networking/wireguard-networkd.nix"
]; |
Thanks very much! Works for 2 interfaces, 1 with just private key, 1 with private and preshared key. |
mkg20001
pushed a commit
to mkg20001/nixpkgs
that referenced
this issue
Dec 17, 2024
…ltiple keys per interface This patch fixes systemd credential loading for wireguard with networkd not working when specifying more than one credential per interface by properly flattening the resulting multidimensional list instead of falling back on string concat with a space. Resolves NixOS#365402
mkg20001
pushed a commit
to mkg20001/nixpkgs
that referenced
this issue
Dec 17, 2024
…ltiple keys per interface This patch fixes systemd credential loading for wireguard with networkd not working when specifying more than one credential per interface by properly flattening the resulting multidimensional list instead of falling back on string concat with a space. Resolves NixOS#365402
mkg20001
pushed a commit
to mkg20001/nixpkgs
that referenced
this issue
Dec 18, 2024
…ltiple keys per interface This patch fixes systemd credential loading for wireguard with networkd not working when specifying more than one credential per interface by properly flattening the resulting multidimensional list instead of falling back on string concat with a space. Resolves NixOS#365402
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
#364078 introduced a switch to use systemd credentials. This fails when both private key and preshared key files are specified.
The cause appears to be that
LoadCredential=wireguard-wg0-private-key:/run/secrets/wireguard-wg0-private-key wireguard-wg0-my-peer-preshared-key:/run/secrets/wireguard-wg0-preshared-key
is not a valid way to specify multiple secrets.This results in
Failed to deserialize: Invalid Argument
errors, and systemd-networkd not coming up.Steps To Reproduce
Configuration below, with some of the data redacted
On target system inspecting the override.conf produced in terms of LoadCredential and trying it out
However multiple lines would have worked
Expected behavior
networkd wireguard working with private and preshared key
Additional context
I'm running systemd 256 (256.8), on nixos-unstable branch
231f5f6370e78d04675c9fa8199be6c3b1b85773
commit.Metadata
Notify maintainers
@Majiir
Note for maintainers: Please tag this issue in your PR.
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: