diff --git a/miniupnpd/miniupnpd.c b/miniupnpd/miniupnpd.c index 3840833..8bd4a0f 100644 --- a/miniupnpd/miniupnpd.c +++ b/miniupnpd/miniupnpd.c @@ -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) {