summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-02-19 09:22:53 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-02-19 09:26:06 -0300
commite09da6c2668f041851316bcb334263814a3daffe (patch)
tree627e24c2cf774f0196a5ab23633f51fd20e5a331 /etc
parent869dfb664a1af87f07384f6bcaba4515a0da8a5c (diff)
downloadpfsense-e09da6c2668f041851316bcb334263814a3daffe.zip
pfsense-e09da6c2668f041851316bcb334263814a3daffe.tar.gz
Fix #3469
Before downloading file to process urltable, there is a random wait time between 5 and 60 seconds. Because of this, the difference between file mtime and current time can be less than $freq * 86400 and it'll be skipped. Add 90 seconds (60 of max random wait + 30 just to be sure) to avoid skipping a file that should be updated
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 4334783..556f590 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -2081,7 +2081,7 @@ function process_alias_urltable($name, $url, $freq, $forceupdate=false) {
// If the file doesn't exist or is older than update_freq days, fetch a new copy.
if (!file_exists($urltable_filename)
- || ((time() - filemtime($urltable_filename)) > ($freq * 86400))
+ || ((time() - filemtime($urltable_filename)) > ($freq * 86400 - 90))
|| $forceupdate) {
// Try to fetch the URL supplied
OpenPOWER on IntegriCloud