Lines Matching defs:lease
54 /* We do things after aquiring the lease, so ensure we have enough time for them */
126 struct dhcp_lease *lease = &state->lease;
134 get_monotonic(&lease->boundtime);
140 get_lease(lease, state->new);
143 iface->name, inet_ntoa(lease->addr));
144 lease->leasetime = ~0U;
145 lease->net.s_addr = ifo->req_mask.s_addr;
149 iface->name, inet_ntoa(lease->addr));
150 lease->leasetime = ~0U;
154 lease->addr.s_addr = ifo->req_addr.s_addr;
156 lease->addr.s_addr = iface->addr.s_addr;
158 inet_ntoa(lease->addr));
159 lease->leasetime = ~0U;
163 lease->leasedfrom = tv.tv_sec;
164 else if (lease->frominfo)
166 if (lease->leasetime == ~0U) {
167 lease->renewaltime =
168 lease->rebindtime =
169 lease->leasetime;
171 iface->name, inet_ntoa(lease->addr));
173 if (lease->leasetime < DHCP_MIN_LEASE) {
175 "%s: minimum lease is %d seconds",
177 lease->leasetime = DHCP_MIN_LEASE;
179 if (lease->rebindtime == 0)
180 lease->rebindtime = lease->leasetime * T2;
181 else if (lease->rebindtime >= lease->leasetime) {
182 lease->rebindtime = lease->leasetime * T2;
184 "%s: rebind time greater than lease "
186 iface->name, lease->rebindtime);
188 if (lease->renewaltime == 0)
189 lease->renewaltime = lease->leasetime * T1;
190 else if (lease->renewaltime > lease->rebindtime) {
191 lease->renewaltime = lease->leasetime * T1;
195 iface->name, lease->renewaltime);
199 inet_ntoa(lease->addr), lease->leasetime);
210 lease->server.s_addr)
219 if (lease->leasetime == ~0U)
220 lease->renewaltime = lease->rebindtime = lease->leasetime;
222 add_timeout_sec(lease->renewaltime, start_renew, iface);
223 add_timeout_sec(lease->rebindtime, start_rebind, iface);
224 add_timeout_sec(lease->leasetime, start_expire, iface);