nixos/dhcpd: make authoritative mode optional
There are circumstances where running secondary DHCP servers in non-authoritative mode is advantageous. Retain the previous authoritative behavior as a default.
This commit is contained in:
parent
2b7c0dcdaa
commit
a8780387ba
|
@ -11,7 +11,7 @@ let
|
||||||
''
|
''
|
||||||
default-lease-time 600;
|
default-lease-time 600;
|
||||||
max-lease-time 7200;
|
max-lease-time 7200;
|
||||||
authoritative;
|
${optionalString (!cfg.authoritative) "not "}authoritative;
|
||||||
ddns-update-style interim;
|
ddns-update-style interim;
|
||||||
log-facility local1; # see dhcpd.nix
|
log-facility local1; # see dhcpd.nix
|
||||||
|
|
||||||
|
@ -176,6 +176,16 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
authoritative = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Whether the DHCP server shall send DHCPNAK messages to misconfigured
|
||||||
|
clients. If this is not done, clients may be unable to get a correct
|
||||||
|
IP address after changing subnets until their old lease has expired.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in New Issue