git.iko.soy/typeable/nixpkgs
on master help sign in
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

commit8eca34dd167e9a116d9a24ef890c65ce4a749c2a authorCharlotte Van Petegem <charlotte@vanpetegem.me> dateSun 26 Jul 2020, 10:03 (6 years ago) parent479db27
1 file changed+3−3
nixos/tests/networking.nix+3−3
nixos/tests/networking.nix+3−3
@@ -32,14 +32,14 @@ let
3232 services.dhcpd4 = {
3333 enable = true;
3434 interfaces = map (n: "eth${toString n}") vlanIfs;
35− extraConfig = ''
36− '' + flip concatMapStrings vlanIfs (n: ''
35+ extraConfig = flip concatMapStrings vlanIfs (n: ''
3736 subnet 192.168.${toString n}.0 netmask 255.255.255.0 {
3837 option routers 192.168.${toString n}.1;
38+ range 192.168.${toString n}.2 192.168.${toString n}.254;
3939 }
4040 '')
4141 ;
42− machines = lib.flip map vlanIfs (vlan:
42+ machines = flip map vlanIfs (vlan:
4343 {
4444 hostName = "client${toString vlan}";
4545 ethernetAddress = qemu-flags.qemuNicMac vlan 1;