From fd1c0db18ca5e7803131aa5086b92801db4f336a Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Sat, 7 Dec 2019 19:10:40 +1100 Subject: [PATCH] hostapd: use getrandom(2) Motivation: Devices with few entropy sources on boot hang/block if many services try to read from /dev/random. https://w1.fi/cgit/hostap/commit/?id=89a7cdd690b48a0c56380cf4609442ed13527f44 states getrandom() is recommended, but not enabled by default since it relies on: * Linux kernel 3.17 (NixOS 19.09 has 4.19; master presumably later) * glibc 2.25 (NixOS master has 2.27 https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/glibc/common.nix#L37 ) --- pkgs/os-specific/linux/hostapd/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/hostapd/default.nix b/pkgs/os-specific/linux/hostapd/default.nix index 41d7f2366822..5689cc1713f8 100644 --- a/pkgs/os-specific/linux/hostapd/default.nix +++ b/pkgs/os-specific/linux/hostapd/default.nix @@ -49,6 +49,7 @@ stdenv.mkDerivation rec { CONFIG_INTERNETWORKING=y CONFIG_HS20=y CONFIG_ACS=y + CONFIG_GETRANDOM=y '' + stdenv.lib.optionalString (sqlite != null) '' CONFIG_SQLITE=y '';