]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We should not use a DHCP lease for IPV4LL.
authorRoy Marples <roy@marples.name>
Fri, 24 Oct 2014 19:24:29 +0000 (19:24 +0000)
committerRoy Marples <roy@marples.name>
Fri, 24 Oct 2014 19:24:29 +0000 (19:24 +0000)
ipv4ll.c

index eaa56435bc2ab0448fceb9513b9c0cdb29460543..17657401d7107d2ace6b374c8aae05013d771dee 100644 (file)
--- a/ipv4ll.c
+++ b/ipv4ll.c
@@ -226,9 +226,10 @@ ipv4ll_start(void *arg)
                return;
        }
 
-       if (state->offer) {
+       if (state->offer && IN_LINKLOCAL(ntohl(state->offer->yiaddr))) {
                astate->addr.s_addr = state->offer->yiaddr;
                free(state->offer);
+               state->offer = NULL;
                ap = ipv4_iffindaddr(ifp, &astate->addr, NULL);
        } else
                ap = ipv4_iffindlladdr(ifp);