nixos/tests/networking: fix macvlan tests

The range option still needs to be defined in dhcpd4 to be able to give out static IP addresses
This commit is contained in:
Charlotte Van Petegem 2020-07-26 10:03:38 +02:00
parent 479db270fb
commit 8eca34dd16

View File

@ -32,14 +32,14 @@ let
services.dhcpd4 = {
enable = true;
interfaces = map (n: "eth${toString n}") vlanIfs;
extraConfig = ''
'' + flip concatMapStrings vlanIfs (n: ''
extraConfig = flip concatMapStrings vlanIfs (n: ''
subnet 192.168.${toString n}.0 netmask 255.255.255.0 {
option routers 192.168.${toString n}.1;
range 192.168.${toString n}.2 192.168.${toString n}.254;
}
'')
;
machines = lib.flip map vlanIfs (vlan:
machines = flip map vlanIfs (vlan:
{
hostName = "client${toString vlan}";
ethernetAddress = qemu-flags.qemuNicMac vlan 1;