required in read_lease_db(). It's already set in packet_to_lease() and
thus both paths to TAILQ_INSERT(lease_db) ensure there is a non-zero
epoch in all lease_db entries.
-/* $OpenBSD: clparse.c,v 1.202 2021/02/21 18:16:59 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.203 2021/02/27 17:44:58 krw Exp $ */
/* Parser for dhclient config and lease files. */
free_client_lease(lp);
}
+ if (lease->epoch == 0)
+ time(&lease->epoch);
TAILQ_INSERT_TAIL(lease_db, lease, next);
}
-/* $OpenBSD: dhclient.c,v 1.704 2021/02/27 13:59:00 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.705 2021/02/27 17:44:58 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
break;
}
- if (lp != NULL && lp->epoch == 0)
- lp->epoch = cur_time;
-
return lp;
}