diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-12-21 20:37:29 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-12-21 20:37:29 +0000 |
commit | 7939591a92d4a22100cb53e2f419505e106d478c (patch) | |
tree | 7c05ccb93561eefed91a97f5535bf339b0441636 /sbin | |
parent | 9c16324b0b0897248488ba16af939984e0830cf8 (diff) |
When binding to a new lease, wait for the RTM_NEWADDR message in
S_BOUND state, which prevents confusion when another DHCPACK arrives.
Problem found and fix tested by kettenis@.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhclient.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index f77e1b3ecb6..11fc4646b43 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.197 2012/12/19 12:25:38 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.198 2012/12/21 20:37:28 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -218,7 +218,6 @@ routehandler(void) inet_ntoa(client->active->address), (long long)(client->active->renewal - time(NULL))); - client->state = S_BOUND; go_daemon(); break; } @@ -739,6 +738,8 @@ bind_lease(void) client->active = client->new; client->new = NULL; + client->state = S_BOUND; + /* Write out new leases file. */ rewrite_client_leases(); |