diff options
Diffstat (limited to 'docs/code/udp-dhcp/main.c')
-rw-r--r-- | docs/code/udp-dhcp/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/code/udp-dhcp/main.c b/docs/code/udp-dhcp/main.c index fc2ca0c8..4dc28390 100644 --- a/docs/code/udp-dhcp/main.c +++ b/docs/code/udp-dhcp/main.c @@ -53,7 +53,8 @@ uv_buf_t make_discover_msg() { // HOPS buffer.base[3] = 0x0; // XID 4 bytes - buffer.base[4] = (unsigned int) random(); + if (uv_random(NULL, NULL, &buffer.base[4], 4, 0, NULL)) + abort(); // SECS buffer.base[8] = 0x0; // FLAGS |