]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Show the correct probe address.
authorRoy Marples <roy@marples.name>
Sat, 5 Jul 2008 22:12:21 +0000 (22:12 +0000)
committerRoy Marples <roy@marples.name>
Sat, 5 Jul 2008 22:12:21 +0000 (22:12 +0000)
client.c

index c24e8caf32510c6f06694d272990a31fb73bd325..631dd6bcda33b209df8f27146738de546bbe3b25 100644 (file)
--- a/client.c
+++ b/client.c
@@ -990,6 +990,7 @@ handle_timeout(struct if_state *state, const struct options *options)
        struct interface *iface = state->interface;
        int i;
        struct timeval tv;
+       struct in_addr addr;
 
 #ifdef ENABLE_ARP
        switch (state->state) {
@@ -998,10 +999,12 @@ handle_timeout(struct if_state *state, const struct options *options)
                if (iface->arp_fd == -1)
                        open_socket(iface, ETHERTYPE_ARP);
                if (state->probes < PROBE_NUM) {
-                       if (state->probes == 0)
+                       if (state->probes == 0) {
+                               addr.s_addr = state->offer->yiaddr;
                                logger(LOG_INFO, "checking %s is available"
                                       " on attached networks",
-                                      inet_ntoa(lease->addr));
+                                      inet_ntoa(addr));
+                       }
                        state->probes++;
                        logger(LOG_DEBUG, "sending ARP probe #%d",
                               state->probes);