mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-29 18:09:11 -04:00
seed random(), so that the message serial number is not always the same.
This commit is contained in:
parent
ec57fd24fc
commit
e19501436a
1 changed files with 3 additions and 1 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rndc.c,v 1.56 2001/04/16 22:00:21 bwelling Exp $ */
|
||||
/* $Id: rndc.c,v 1.57 2001/04/16 23:07:34 bwelling Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: DCL
|
||||
|
|
@ -35,6 +35,7 @@
|
|||
#include <isc/stdtime.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/thread.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isccfg/cfg.h>
|
||||
|
|
@ -280,6 +281,7 @@ rndc_connected(isc_task_t *task, isc_event_t *event) {
|
|||
fatal("connect failed: %s", isc_result_totext(sevent->result));
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
srandom(now + isc_thread_self());
|
||||
DO("create message", isccc_cc_createmessage(1, NULL, NULL, random(),
|
||||
now, now + 60, &request));
|
||||
data = isccc_alist_lookup(request, "_data");
|
||||
|
|
|
|||
Loading…
Reference in a new issue