miniupnpd.c: init random number generator in init()

This commit is contained in:
Thomas Bernard 2014-02-25 10:24:22 +01:00
parent 8691c9c0e0
commit e00c1bc6e9
1 changed files with 4 additions and 0 deletions

View File

@ -706,6 +706,7 @@ void complete_uuidvalues(void)
* 6) set startup time stamp
* 7) compute presentation URL
* 8) set signal handlers
* 9) init random generator (srandom())
* 10) init redirection engine
* 11) reload mapping from leasefile */
static int
@ -1265,6 +1266,9 @@ init(int argc, char * * argv, struct runtime_vars * v)
syslog(LOG_NOTICE, "Failed to set %s handler", "SIGUSR1");
}
/* initialize random number generator */
srandom((unsigned int)time(NULL));
/* initialize redirection engine (and pinholes) */
if(init_redirect() < 0)
{