• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/busybox/networking/udhcp/

Lines Matching refs:lease

54 	// (for example, from lease file). Client may not know that,
151 struct dyn_lease *lease,
161 /* If it is a static lease, use its IP */
165 /* We have no static lease for client's chaddr */
169 if (lease) {
170 /* We have a dynamic lease for client's chaddr.
171 * Reuse its IP (even if lease is expired).
174 packet.yiaddr = lease->lease_nip;
180 /* and the IP is in the lease range */
184 && ( !(lease = find_lease_by_nip(req_nip)) /* is not already taken */
185 || is_expired_lease(lease) /* or is taken, but expired */
201 lease = add_lease(packet.chaddr, packet.yiaddr,
206 if (!lease) {
276 * in 'yiaddr' or including lease time parameters. The servers SHOULD
282 * of the DHCPINFORM message. The server MUST NOT send a lease
408 struct dyn_lease *lease, fake_lease;
487 /* Look for a static/dynamic lease */
490 bb_info_msg("Found static lease: %x", static_lease_nip);
494 lease = &fake_lease;
496 lease = find_lease_by_mac(packet.chaddr);
510 send_offer(&packet, static_lease_nip, lease, requested_ip_opt, arpping_ms);
574 configured, and is trying to extend its lease. This message will
580 A client MAY choose to renew or extend its lease prior to T1. The
581 server may choose not to extend the lease (as a policy decision by
590 configured, and is trying to extend its lease. This message MUST
598 A DHCP server MAY extend a client's lease only if it has local
608 if (lease && requested_nip == lease->lease_nip) {
609 /* client requested or configured IP matches the lease.
610 * ACK it, and bump lease expiration time. */
611 send_ACK(&packet, lease->lease_nip);
614 /* No lease for this MAC, or lease IP != requested IP */
642 && lease /* chaddr matches this lease */
643 && requested_nip == lease->lease_nip
645 memset(lease->lease_mac, 0, sizeof(lease->lease_mac));
646 lease->expires = time(NULL) + server_config.decline_time;
661 && lease /* chaddr matches this lease */
662 && packet.ciaddr == lease->lease_nip
664 lease->expires = time(NULL);