[Git][NTPsec/ntpsec][master] rand => intercept_ntp_random
    Hal Murray 
    gitlab at mg.gitlab.com
       
    Tue Dec  8 08:26:09 UTC 2015
    
    
  
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
d25c962e by Hal Murray at 2015-12-08T00:24:40Z
rand => intercept_ntp_random
- - - - -
1 changed file:
- ntpd/ntp_control.c
Changes:
=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -3448,7 +3448,7 @@ send_random_tag_value(
 	int	noise;
 	char	buf[32];
 
-	noise = rand() ^ (rand() << 16);
+	noise = intercept_ntp_random("send_random_tag");
 	buf[0] = 'a' + noise % 26;
 	noise >>= 5;
 	buf[1] = 'a' + noise % 26;
@@ -3488,7 +3488,7 @@ send_mru_entry(
 
 	remaining = COUNTOF(sent);
 	ZERO(sent);
-	noise = (uint32_t)(rand() ^ (rand() << 16));
+	noise = intercept_ntp_random("send_mru_entry");
 	while (remaining > 0) {
 		which = (noise & 7) % COUNTOF(sent);
 		noise >>= 3;
@@ -3923,7 +3923,7 @@ send_ifstats_entry(
 	noisebits = 0;
 	while (remaining > 0) {
 		if (noisebits < 4) {
-			noise = rand() ^ (rand() << 16);
+			noise = intercept_ntp_random("send_ifstats_entry");
 			noisebits = 31;
 		}
 		which = (noise & 0xf) % COUNTOF(sent);
@@ -4102,7 +4102,7 @@ send_restrict_entry(
 	noisebits = 0;
 	while (remaining > 0) {
 		if (noisebits < 2) {
-			noise = rand() ^ (rand() << 16);
+			noise = intercept_ntp_random("send_restrict_entry");
 			noisebits = 31;
 		}
 		which = (noise & 0x3) % COUNTOF(sent);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d25c962e7db050cf9b430bd2d7bbf92d350c7a9b
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151208/eb8e2a20/attachment.html>
    
    
More information about the vc
mailing list