diff options
author | Kevin Steves <stevesk@cvs.openbsd.org> | 2006-05-31 02:21:50 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@cvs.openbsd.org> | 2006-05-31 02:21:50 +0000 |
commit | f27c7905a51a4c73bc413881786caecb6fa2a082 (patch) | |
tree | 6c9ffb63d2bd5f5a0821ef6fcfbe30fa1eb5c8b2 | |
parent | fdccb5f0f7db3f21dbff93bd3665bbd1930fca25 (diff) |
Fix 'special value 0 requests that dhclient not wait for a link state
change before timing out' behaviour of the man page for link-timeout;
ok deraadt@ henning@
-rw-r--r-- | sbin/dhclient/dhclient.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index d36f635dacb..715eb0a1ae1 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.83 2006/05/08 17:25:59 deraadt Exp $ */ +/* $OpenBSD: dhclient.c,v 1.84 2006/05/31 02:21:49 stevesk Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -310,6 +310,10 @@ main(int argc, char *argv[]) if (!interface_link_status(ifi->name)) { fprintf(stderr, "%s: no link ...", ifi->name); + if (ifi->client->config->link_timeout == 0) { + fprintf(stderr, " giving up\n"); + exit(1); + } fflush(stderr); sleep(1); while (!interface_link_status(ifi->name)) { |