diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-02-19 09:22:53 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-02-19 09:22:53 -0300 |
commit | 47f7842f80ec52081bce27e9230203763adb0064 (patch) | |
tree | 6c922a3db363533125367373d18038d0b135df9a /etc | |
parent | d06ad5eb05b26eb811b67bbb94f2bd01884c43de (diff) | |
download | pfsense-47f7842f80ec52081bce27e9230203763adb0064.zip pfsense-47f7842f80ec52081bce27e9230203763adb0064.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.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index cd03d69..3654ec3 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -2021,7 +2021,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 |