Fix blocked entropy generation
authorCristian Ciocaltea <cristian.ciocaltea@gmail.com>
Tue, 21 Jan 2020 14:43:24 +0000 (16:43 +0200)
committerPetr Štetiar <ynezz@true.cz>
Tue, 21 Jan 2020 15:56:08 +0000 (16:56 +0100)
commit236b7a0aef2189ee49d6ca82ebc3bf2e06fd623d
treefc1116a9bc14bca08587dd72970ed1449d27c090
parent40f939d57c67bbe2987a863500cca02e91d34b90
Fix blocked entropy generation

The OpenWrt Jitter RNG daemon is currently unable to continuously
provide entropy, except once on process startup.

This patch brings the following fixes:
- poll /dev/random for unblocking write operations, instead of read
- register the low entropy callback after uloop initialization, not
  before

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
[commit subject tweak, uloop_done cleanup]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
urngd.c