From: Roy Marples Date: Tue, 15 Jul 2008 14:59:00 +0000 (+0000) Subject: Ensure that IPv4LL address is one :) X-Git-Tag: v4.0.2~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=410016e1dc2ca358820e1ecd8823222d4b10987b;p=thirdparty%2Fdhcpcd.git Ensure that IPv4LL address is one :) --- diff --git a/client.c b/client.c index e4a12176..7b76662f 100644 --- a/client.c +++ b/client.c @@ -373,7 +373,8 @@ ipv4ll_get_dhcp(uint32_t old_addr) dhcp->yiaddr = htonl(LINKLOCAL_ADDR | (((uint32_t)abs((int)arc4random()) % 0xFD00) + 0x0100)); - if (dhcp->yiaddr != old_addr) + if (dhcp->yiaddr != old_addr && + IN_LINKLOCAL(ntohl(dhcp->yiaddr))) break; } return dhcp;