Changeset 1179
- Timestamp:
- 04/25/08 11:02:49 (5 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 2 modified
-
aes/dns_random.cc (modified) (1 diff)
-
pdns_recursor.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/aes/dns_random.cc
r1171 r1179 24 24 memcpy(g_counter+sizeof(now.tv_usec), &now.tv_sec, sizeof(now.tv_sec)); 25 25 g_in = getpid() | (getppid()<<16); 26 27 srandom(now.tv_usec); 26 srandom(dns_random(numeric_limits<uint32_t>::max())); 28 27 } 29 28 -
trunk/pdns/pdns/pdns_recursor.cc
r1170 r1179 272 272 int tries=10; 273 273 while(--tries) { 274 uint16_t port=1025+ Utility::random()%64510;274 uint16_t port=1025+dns_random(64510); 275 275 if(tries==1) // fall back to kernel 'random' 276 276 port=0;