Lines Matching refs:lease
145 static void dhcp_lease_free(DHCPLease *lease) {
146 if (!lease)
149 free(lease->client_id.data);
150 free(lease);
154 DHCPLease *lease;
175 while ((lease = hashmap_steal_first(server->leases_by_client_id)))
176 dhcp_lease_free(lease);
848 DHCPLease *lease;
852 lease = new0(DHCPLease, 1);
853 lease->address = req->requested_ip;
854 lease->client_id.data = memdup(req->client_id.data,
856 if (!lease->client_id.data) {
857 free(lease);
860 lease->client_id.length = req->client_id.length;
861 memcpy(&lease->chaddr, &req->message->chaddr,
863 lease->gateway = req->message->giaddr;
865 lease = existing_lease;
872 dhcp_lease_free(lease);
876 lease->expiration = req->lifetime * USEC_PER_SEC + time_now;
885 dhcp_lease_free(lease);
892 server->bound_leases[pool_offset] = lease;
894 &lease->client_id, lease);
1054 DHCPLease *lease = server->bound_leases[i];
1056 if (!lease || lease == &server->invalid_lease)
1059 r = server_send_forcerenew(server, lease->address,
1060 lease->gateway,
1061 lease->chaddr);