+static void valid_until_cb(struct uloop_timeout *event)
+{
+ time_t now = odhcpd_time();
+ struct interface *iface;
+ list_for_each_entry(iface, &interfaces, head) {
+ if (iface->dhcpv4 != MODE_SERVER || iface->dhcpv4_assignments.next == NULL)
+ continue;
+
+ struct dhcpv4_assignment *a, *n;
+ list_for_each_entry_safe(a, n, &iface->dhcpv4_assignments, head) {
+ if (!INFINITE_VALID(a->valid_until) && a->valid_until < now)
+ free_dhcpv4_assignment(a);
+ }
+ }
+ uloop_timeout_set(event, 1000);
+}
+