Use the ncmlib combined Tausworthe PRNG.

This commit is contained in:
Nicholas J. Kain 2014-03-12 12:47:04 -04:00
parent c0fc3ed430
commit be456ddeee
2 changed files with 2 additions and 2 deletions

View File

@ -636,7 +636,7 @@ int send_decline(struct client_state_t *cs, uint32_t server)
int send_release(struct client_state_t *cs) int send_release(struct client_state_t *cs)
{ {
struct dhcpmsg packet = init_packet(DHCPRELEASE, libc_random_u32()); struct dhcpmsg packet = init_packet(DHCPRELEASE, nk_random_u32());
packet.ciaddr = cs->clientAddr; packet.ciaddr = cs->clientAddr;
add_option_reqip(&packet, cs->clientAddr); add_option_reqip(&packet, cs->clientAddr);
add_option_serverid(&packet, cs->serverAddr); add_option_serverid(&packet, cs->serverAddr);

View File

@ -306,7 +306,7 @@ static void selecting_timeout(struct client_state_t *cs, long long nowts)
} }
} }
if (num_dhcp_requests == 0) if (num_dhcp_requests == 0)
cs->xid = libc_random_u32(); cs->xid = nk_random_u32();
send_discover(cs); send_discover(cs);
dhcp_wake_ts = nowts + delay_timeout(num_dhcp_requests); dhcp_wake_ts = nowts + delay_timeout(num_dhcp_requests);
num_dhcp_requests++; num_dhcp_requests++;