summaryrefslogtreecommitdiff
path: root/usr/src/cmd/cmd-inet/sbin/dhcpagent/request.c
diff options
context:
space:
mode:
authordh155122 <none@none>2006-06-08 19:21:20 -0700
committerdh155122 <none@none>2006-06-08 19:21:20 -0700
commitc2934490a71fd1db5f18fa4b6f290718ef053845 (patch)
tree9282df8138d66360143fa47dbd3539ed14b7256b /usr/src/cmd/cmd-inet/sbin/dhcpagent/request.c
parent52d1efee5f53cb9fdefa0a02ae88d6c1822dc712 (diff)
downloadillumos-gate-c2934490a71fd1db5f18fa4b6f290718ef053845.tar.gz
6424883 dhcp client can end up idling in INIT if initial packets go unanswered
6425063 dhcp client: edge case can leave interface offer timer running indefinitely
Diffstat (limited to 'usr/src/cmd/cmd-inet/sbin/dhcpagent/request.c')
-rw-r--r--usr/src/cmd/cmd-inet/sbin/dhcpagent/request.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr/src/cmd/cmd-inet/sbin/dhcpagent/request.c b/usr/src/cmd/cmd-inet/sbin/dhcpagent/request.c
index ab6ebb78f5..3e8e66572c 100644
--- a/usr/src/cmd/cmd-inet/sbin/dhcpagent/request.c
+++ b/usr/src/cmd/cmd-inet/sbin/dhcpagent/request.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* REQUESTING state of the client state machine.
@@ -73,6 +72,8 @@ dhcp_requesting(iu_tq_t *tqp, void *arg)
PKT_LIST *offer;
lease_t lease;
+ ifsp->if_offer_timer = -1;
+
if (check_ifs(ifsp) == 0) {
(void) release_ifs(ifsp);
return;
@@ -93,8 +94,8 @@ dhcp_requesting(iu_tq_t *tqp, void *arg)
* ourselves for callback.
*/
- if (iu_schedule_timer(tq, ifsp->if_offer_wait,
- dhcp_requesting, ifsp) == -1) {
+ if ((ifsp->if_offer_timer = iu_schedule_timer(tq,
+ ifsp->if_offer_wait, dhcp_requesting, ifsp)) == -1) {
/*
* ugh. the best we can do at this point is