diff options
author | Emery Hemingway <ehmry@posteo.net> | 2020-07-08 01:45:57 +0530 |
---|---|---|
committer | ehmry <ehmry@posteo.net> | 2020-07-25 16:33:04 +0200 |
commit | a8780387ba8b331a69501f5793157d6d3545602a (patch) | |
tree | 02f6f33b1bb6cd7bb44cf19cfa8995ed10fcc8a4 /nixos/modules/services/networking/dhcpd.nix | |
parent | 2b7c0dcdaab946153b0eaba5f2420f15ea27b0d6 (diff) | |
download | nixpkgs-a8780387ba8b331a69501f5793157d6d3545602a.tar nixpkgs-a8780387ba8b331a69501f5793157d6d3545602a.tar.gz nixpkgs-a8780387ba8b331a69501f5793157d6d3545602a.tar.bz2 nixpkgs-a8780387ba8b331a69501f5793157d6d3545602a.tar.lz nixpkgs-a8780387ba8b331a69501f5793157d6d3545602a.tar.xz nixpkgs-a8780387ba8b331a69501f5793157d6d3545602a.tar.zst nixpkgs-a8780387ba8b331a69501f5793157d6d3545602a.zip |
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.
Diffstat (limited to 'nixos/modules/services/networking/dhcpd.nix')
-rw-r--r-- | nixos/modules/services/networking/dhcpd.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/dhcpd.nix b/nixos/modules/services/networking/dhcpd.nix index 67f7d811887..8966deac76c 100644 --- a/nixos/modules/services/networking/dhcpd.nix +++ b/nixos/modules/services/networking/dhcpd.nix @@ -11,7 +11,7 @@ let '' default-lease-time 600; max-lease-time 7200; - authoritative; + ${optionalString (!cfg.authoritative) "not "}authoritative; ddns-update-style interim; 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 |