mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/wireguard: fix mtu after switching netns.
mtu is set after switching netns and thus the new netns should be used.
This commit is contained in:
parent
710635f625
commit
5a4dc2128e
@ -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}"''
|
||||
|
@ -39,6 +39,7 @@ import ../make-test-python.nix ({ pkgs, lib, kernelPackages ? null, ... } : {
|
||||
preSetup = ''
|
||||
ip netns add ${interfaceNamespace}
|
||||
'';
|
||||
mtu = 1280;
|
||||
inherit interfaceNamespace;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user