setstate(istate->randomstate);
do {
+ long r;
+
/* RFC 3927 Section 2.1 states that the first 256 and
* last 256 addresses are reserved for future use.
* See ipv4ll_start for why we don't use arc4_random. */
/* coverity[dont_call] */
+ r = random();
addr.s_addr = ntohl(LINKLOCAL_ADDR |
- ((uint32_t)(random() % 0xFD00) + 0x0100));
+ ((uint32_t)(r % 0xFD00) + 0x0100));
/* No point using a failed address */
if (addr.s_addr == astate->failed.s_addr)