diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-07-13 14:50:04 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-07-13 14:50:04 +0000 |
commit | a81f7159d4416bba59cca81c9a4af0280bccf303 (patch) | |
tree | ca11b8b1c73d4aad849a8863209856d68584b67d | |
parent | 89d06eb2a631d332bf55ced353f7bfdcc43e8019 (diff) |
When renewing a lease, update client->active or you end up in a
tight renew loop. Caused by recent reshuffling of code in
bind_lease().
-rw-r--r-- | sbin/dhclient/dhclient.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index b5264ce7d39..7562a3e23a7 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.317 2014/07/12 21:04:07 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.318 2014/07/13 14:50:03 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -840,9 +840,11 @@ bind_lease(void) compare_lease(client->active, client->new) == 0) { client->new->resolv_conf = client->active->resolv_conf; client->active->resolv_conf = NULL; + client->active = client->new; + client->new = NULL; note("bound to %s -- renewal in %lld seconds.", - inet_ntoa(client->new->address), - (long long)(client->new->renewal - time(NULL))); + inet_ntoa(client->active->address), + (long long)(client->active->renewal - time(NULL))); goto newlease; } |