summary refs log tree commit diff
path: root/nixos/tests/ipv6.nix
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2019-04-11 19:41:47 +0200
committerLinus Heckemann <git@sphalerite.org>2019-06-07 21:43:29 +0200
commit26317b02aeae3ae5f086f22822ccd9695df03bb8 (patch)
treeab27c919a0ad520473a8d08f9e210560b4595d91 /nixos/tests/ipv6.nix
parentfef728b6ead201c1ddb812e2afb22ac372669e46 (diff)
downloadnixpkgs-26317b02aeae3ae5f086f22822ccd9695df03bb8.tar
nixpkgs-26317b02aeae3ae5f086f22822ccd9695df03bb8.tar.gz
nixpkgs-26317b02aeae3ae5f086f22822ccd9695df03bb8.tar.bz2
nixpkgs-26317b02aeae3ae5f086f22822ccd9695df03bb8.tar.lz
nixpkgs-26317b02aeae3ae5f086f22822ccd9695df03bb8.tar.xz
nixpkgs-26317b02aeae3ae5f086f22822ccd9695df03bb8.tar.zst
nixpkgs-26317b02aeae3ae5f086f22822ccd9695df03bb8.zip
nixos/network-interfaces: always apply privacy extensions
Fixes #56306
Diffstat (limited to 'nixos/tests/ipv6.nix')
-rw-r--r--nixos/tests/ipv6.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/tests/ipv6.nix b/nixos/tests/ipv6.nix
index 14f24c29cfe..d11eba764da 100644
--- a/nixos/tests/ipv6.nix
+++ b/nixos/tests/ipv6.nix
@@ -1,14 +1,16 @@
 # Test of IPv6 functionality in NixOS, including whether router
 # solicication/advertisement using radvd works.
 
-import ./make-test.nix ({ pkgs, ...} : {
+import ./make-test.nix ({ pkgs, lib, ...} : {
   name = "ipv6";
   meta = with pkgs.stdenv.lib.maintainers; {
     maintainers = [ eelco ];
   };
 
   nodes =
-    { client = { ... }: { };
+    # Remove the interface configuration provided by makeTest so that the
+    # interfaces are all configured implicitly
+    { client = { ... }: { networking.interfaces = lib.mkForce {}; };
 
       server =
         { ... }:
@@ -73,6 +75,11 @@ import ./make-test.nix ({ pkgs, ...} : {
           $client->succeed("curl --fail -g http://[$serverIp]");
           $client->fail("curl --fail -g http://[$clientIp]");
       };
+      subtest "privacy extensions", sub {
+          my $ip = waitForAddress $client, "eth1", "global temporary";
+          # Default route should have "src <temporary address>" in it
+          $client->succeed("ip r g ::2 | grep $ip");
+      };
 
       # TODO: test reachability of a machine on another network.
     '';