From 653ccad28dc0a0924ba15c0eb6c7963b84b80d36 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Mon, 19 Mar 2018 09:35:45 +0000 Subject: [PATCH] mod_md: fixes error in renew window calculation that may lead to mod_md running watchdog in a tight loop until actual renewal becomes necessary. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827180 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ modules/md/mod_md.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 729baf3688..27352252ab 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.1 + *) mod_md: fixes error in renew window calculation that may lead to mod_md running + watchdog in a tight loop until actual renewal becomes necessary. [Stefan Eissing] + *) mod_md: /.well-known/acme-challenge requests that cannot be answered for hostnames outside the configured MDs are free to be answered by other handlers. This allows co-existance between mod_md and other ACME clients on the same server (implements PR62189). diff --git a/modules/md/mod_md.c b/modules/md/mod_md.c index ae13118e23..0b4af20318 100644 --- a/modules/md/mod_md.c +++ b/modules/md/mod_md.c @@ -698,11 +698,11 @@ static apr_status_t check_job(md_watchdog *wd, md_job_t *job, apr_pool_t *ptemp) } } else { - job->next_check = job->md->expires - job->md->renew_window; - + /* Renew is not necessary yet, leave job->next_check as 0 since + * that keeps the default schedule of running twice a day. */ apr_rfc822_date(ts, job->md->expires); ap_log_error( APLOG_MARK, APLOG_DEBUG, 0, wd->s, APLOGNO(10053) - "md(%s): is complete, cert expires %s", job->md->name, ts); + "md(%s): no need to renew yet, cert expires %s", job->md->name, ts); } } -- 2.40.0