]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix test mode by checking for an IPv4LL address
authorRoy Marples <roy@marples.name>
Sat, 19 Sep 2015 16:31:43 +0000 (16:31 +0000)
committerRoy Marples <roy@marples.name>
Sat, 19 Sep 2015 16:31:43 +0000 (16:31 +0000)
script.c

index 86fe9556a57203fc0a79133ba270ca91bd2a1d15..44bfed9b3ca7aeda3a56faa1e453ef81cc4c2188 100644 (file)
--- a/script.c
+++ b/script.c
@@ -261,10 +261,10 @@ make_env(const struct interface *ifp, const char *reason, char ***argv)
                        ra = 1;
 #endif
 #ifdef INET
-               else if (state->added)
-                       dhcp = 1;
-               else
+               else if (istate && istate->addr.s_addr != INADDR_ANY)
                        ipv4ll = 1;
+               else
+                       dhcp = 1;
 #endif
        }
 #ifdef INET6