summary refs log tree commit diff
path: root/nixos/modules/services/networking/dhcpcd.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-24 15:08:31 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-24 15:19:26 +0200
commit2d8c0d24f206a3eb32cd86653fa6e70f8018929c (patch)
treed6a21f5a647b04eebf6443261abab2a015421b95 /nixos/modules/services/networking/dhcpcd.nix
parent25af3671f9f33c066acd40702268b0fdb900b238 (diff)
downloadnixpkgs-2d8c0d24f206a3eb32cd86653fa6e70f8018929c.tar
nixpkgs-2d8c0d24f206a3eb32cd86653fa6e70f8018929c.tar.gz
nixpkgs-2d8c0d24f206a3eb32cd86653fa6e70f8018929c.tar.bz2
nixpkgs-2d8c0d24f206a3eb32cd86653fa6e70f8018929c.tar.lz
nixpkgs-2d8c0d24f206a3eb32cd86653fa6e70f8018929c.tar.xz
nixpkgs-2d8c0d24f206a3eb32cd86653fa6e70f8018929c.tar.zst
nixpkgs-2d8c0d24f206a3eb32cd86653fa6e70f8018929c.zip
dhcpcd: Fix segfaults
This fixes several problems in the dhcpcd service:

* A segfault during startup, due to a race with udev (dhcpcd would get
  an ADD event from udev, causing it to re-add an interface that it
  already had, leading to a segfault later on).

* A hang/segfault processing "dhcpcd rebind" (which NixOS calls after
  waking up from suspend).

Also, add "lo" to the list of ignored interfaces. It usually ignores
"lo", but apparently not when it gets an ADD event from udev.
Diffstat (limited to 'nixos/modules/services/networking/dhcpcd.nix')
-rw-r--r--nixos/modules/services/networking/dhcpcd.nix6
1 files changed, 2 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix
index ce9b4a3b15d..757340b3c2c 100644
--- a/nixos/modules/services/networking/dhcpcd.nix
+++ b/nixos/modules/services/networking/dhcpcd.nix
@@ -36,7 +36,7 @@ let
       # Ethernet cards used for bridging.  Likewise for vif* and tap*
       # (Xen) and virbr* and vnet* (libvirt) and c-* and ctmp-* (NixOS
       # containers).
-      denyinterfaces ${toString ignoredInterfaces} peth* vif* tap* tun* virbr* vnet* vboxnet* c-* ctmp-*
+      denyinterfaces ${toString ignoredInterfaces} lo peth* vif* tap* tun* virbr* vnet* vboxnet* c-* ctmp-*
 
       ${config.networking.dhcpcd.extraConfig}
     '';
@@ -98,7 +98,6 @@ in
       { description = "DHCP Client";
 
         wantedBy = [ "network.target" ];
-        after = [ "systemd-udev-settle.service" ]; # FIXME
 
         # Stopping dhcpcd during a reconfiguration is undesirable
         # because it brings down the network interfaces configured by
@@ -112,9 +111,8 @@ in
         serviceConfig =
           { Type = "forking";
             PIDFile = "/run/dhcpcd.pid";
-            ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --config ${dhcpcdConf}";
+            ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --quiet --config ${dhcpcdConf}";
             ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind";
-            StandardError = "null";
             Restart = "always";
           };
       };