From 7939591a92d4a22100cb53e2f419505e106d478c Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Fri, 21 Dec 2012 20:37:29 +0000 Subject: 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@. --- sbin/dhclient/dhclient.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin') 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 @@ -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(); -- cgit v1.2.3