Merge pull request #215493 from Izorkin/fix-dhcpcd-ipv6rs

This commit is contained in:
Sandro 2023-04-01 22:58:01 +02:00 committed by GitHub
commit b5618fe81b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -286,6 +286,7 @@ In addition to numerous new and upgraded packages, this release has the followin
```
- `services.dhcpcd` service now don't solicit or accept IPv6 Router Advertisements on interfaces that use static IPv6 addresses.
If network uses both IPv6 Unique local addresses (ULA) and global IPv6 address auto-configuration with SLAAC, must add the parameter `networking.dhcpcd.IPv6rs = true;`.
- The module `services.headscale` was refactored to be compliant with [RFC 0042](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md). To be precise, this means that the following things have changed:

View File

@ -81,9 +81,12 @@ let
noipv6
''}
${cfg.extraConfig}
${optionalString (config.networking.enableIPv6 && cfg.IPv6rs == null && staticIPv6Addresses != [ ]) noIPv6rs}
${optionalString (config.networking.enableIPv6 && cfg.IPv6rs == false) ''
noipv6rs
''}
${optionalString config.networking.enableIPv6 noIPv6rs}
${cfg.extraConfig}
'';
exitHook = pkgs.writeText "dhcpcd.exit-hook"
@ -160,6 +163,16 @@ in
'';
};
networking.dhcpcd.IPv6rs = mkOption {
type = types.nullOr types.bool;
default = null;
description = lib.mdDoc ''
Force enable or disable solicitation and receipt of IPv6 Router Advertisements.
This is required, for example, when using a static unique local IPv6 address (ULA)
and global IPv6 address auto-configuration with SLAAC.
'';
};
networking.dhcpcd.runHook = mkOption {
type = types.lines;
default = "";