Merge pull request #219549 from SEIAROTg/master

nixos/wireguard: fix mtu after switching netns.
This commit is contained in:
Naïm Favier 2023-03-05 22:56:29 +01:00 committed by GitHub
commit 6082d5bd0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -461,7 +461,7 @@ let
${ipPreMove} link add dev "${name}" type wireguard
${optionalString (values.interfaceNamespace != null && values.interfaceNamespace != values.socketNamespace) ''${ipPreMove} link set "${name}" netns "${ns}"''}
${optionalString (values.mtu != null) ''${ipPreMove} link set "${name}" mtu ${toString values.mtu}''}
${optionalString (values.mtu != null) ''${ipPostMove} link set "${name}" mtu ${toString values.mtu}''}
${concatMapStringsSep "\n" (ip:
''${ipPostMove} address add "${ip}" dev "${name}"''

View File

@ -39,6 +39,7 @@ import ../make-test-python.nix ({ pkgs, lib, kernelPackages ? null, ... } : {
preSetup = ''
ip netns add ${interfaceNamespace}
'';
mtu = 1280;
inherit interfaceNamespace;
};
};