From d59bfded58b63611b0f9d929c446bd03c5ae3630 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Wed, 21 Oct 2020 14:16:44 +0300 Subject: [PATCH] nixos/dhcpcd: if disabled IPv6 don't solicit or accept IPv6 --- nixos/modules/services/networking/dhcpcd.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index 0507b739d499..d10bffd91474 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -69,6 +69,11 @@ let if-carrier-up = ""; }.${cfg.wait}} + ${optionalString (config.networking.enableIPv6 == false) '' + # Don't solicit or accept IPv6 Router Advertisements and DHCPv6 if disabled IPv6 + noipv6 + ''} + ${cfg.extraConfig} '';