nixos/tests/networking: fix DHCP range

Exclude static 192.168.*.2 addresses from the dynamic address range to
prevent different interfaces from getting the same address.

Seems like configuring a fixed IPv4 address does not automatically
exclude it from the dynamic address range.

Should fix occasional failures of
nixos.tests.networking.scripted.macvlan and possibly other networking
tests relying on DHCP.
This commit is contained in:
Andrey Golovizin 2021-02-10 19:53:35 +01:00
parent dd65c8b2a7
commit 1f3c9fd0ef

View file

@ -35,7 +35,7 @@ let
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;
range 192.168.${toString n}.3 192.168.${toString n}.254;
}
'')
;