summaryrefslogtreecommitdiff
path: root/lib/addns/dnsrecord.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/addns/dnsrecord.c')
-rw-r--r--lib/addns/dnsrecord.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/addns/dnsrecord.c b/lib/addns/dnsrecord.c
index 724d0dfd8fa..0d149373997 100644
--- a/lib/addns/dnsrecord.c
+++ b/lib/addns/dnsrecord.c
@@ -22,6 +22,7 @@
*/
#include "dns.h"
+#include "lib/util/genrand.h"
DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name,
uint16_t q_type, uint16_t q_class,
@@ -39,7 +40,7 @@ DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name,
return ERROR_DNS_NO_MEMORY;
}
- req->id = random();
+ generate_random_buffer((uint8_t *)&req->id, sizeof(req->id));
req->num_questions = 1;
q = req->questions[0];