]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If we fail to get an ipv4ll address, start over
authorRoy Marples <roy@marples.name>
Tue, 13 Nov 2007 10:55:55 +0000 (10:55 +0000)
committerRoy Marples <roy@marples.name>
Tue, 13 Nov 2007 10:55:55 +0000 (10:55 +0000)
client.c

index ed079b9841b3b944641d09f2453762f9d3a68f48..86a34881cf94e27bf75f3501dc61e665c3c16483 100644 (file)
--- a/client.c
+++ b/client.c
@@ -535,6 +535,13 @@ int dhcp_run (const options_t *options, int *pidfd)
                                                        free_dhcp (dhcp);
                                                        memset (dhcp, 0, sizeof (dhcp_t));
                                                        if (ipv4ll_get_address (iface, dhcp) == -1) {
+                                                               if (! daemonised) {
+                                                                       retval = EXIT_FAILURE;
+                                                                       goto eexit;
+                                                               }
+
+                                                               /* start over */
+                                                               xid = 0;
                                                                break;
                                                        }
                                                        timeout = dhcp->renewaltime;