From 8698be4e48e831902594fc983dc6f7f94541978c Mon Sep 17 00:00:00 2001 From: krw Date: Mon, 21 Apr 2014 15:26:50 +0000 Subject: [PATCH] Ooops. Delete discarded offered leases from correct TAILQ. More than one offer would cause infinite loop. ok guenther@ --- sbin/dhclient/dhclient.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 8f50b17c8b4..894e7e7d3d2 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.298 2014/04/20 21:25:07 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.299 2014/04/21 15:26:50 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -681,16 +681,12 @@ state_selecting(void) while (!TAILQ_EMPTY(&client->offered_leases)) { lp = TAILQ_FIRST(&client->offered_leases); - TAILQ_REMOVE(&client->leases, lp, next); + TAILQ_REMOVE(&client->offered_leases, lp, next); make_decline(lp); send_decline(); free_client_lease(lp); } - /* - * If we just tossed all the leases we were offered, go back - * to square one. - */ if (!picked) { state_panic(); return; -- 2.20.1