]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix auto-configure
authorRoy Marples <roy@marples.name>
Sat, 1 Feb 2014 10:40:40 +0000 (10:40 +0000)
committerRoy Marples <roy@marples.name>
Sat, 1 Feb 2014 10:40:40 +0000 (10:40 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index b9b6c46374060e3d32a846a0e08feaa48404248c..f4a9a45dfb3a1fc131ab5f52c480b430adf4a900 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -2275,7 +2275,7 @@ dhcp_handledhcp(struct interface *iface, struct dhcp_message **dhcpp,
                        free(msg);
                }
                if (state->state == DHS_DISCOVER &&
-                   get_option_uint8(&tmp, dhcp, DHO_AUTOCONFIGURE) != 0)
+                   get_option_uint8(&tmp, dhcp, DHO_AUTOCONFIGURE) == 0)
                {
                        switch (tmp) {
                        case 0:
@@ -2290,7 +2290,11 @@ dhcp_handledhcp(struct interface *iface, struct dhcp_message **dhcpp,
                                log_dhcp(LOG_WARNING, "IPv4LL enabled from",
                                    iface, dhcp, from);
                                eloop_timeout_delete(NULL, iface);
-                               ipv4ll_start(iface);
+                               if (IN_LINKLOCAL(htonl(state->addr.s_addr)))
+                                       eloop_timeout_add_sec(DHCP_MAX,
+                                           dhcp_discover, iface);
+                               else
+                                       ipv4ll_start(iface);
                                break;
                        default:
                                syslog(LOG_ERR,