From: pcarana Date: Tue, 5 Mar 2019 21:31:22 +0000 (-0600) Subject: Force cache reset on db update, use millisecs at last update of db file X-Git-Tag: v0.0.2~52^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f6b1b6824645e809fa1264090fc3b948680a7c7;p=thirdparty%2FFORT-validator.git Force cache reset on db update, use millisecs at last update of db file --- diff --git a/src/csv.c b/src/csv.c index ec852ca7..c3b5bb64 100644 --- a/src/csv.c +++ b/src/csv.c @@ -263,7 +263,7 @@ load_vrps_file(bool check_update) goto end2; } - last_update = attr.st_mtim.tv_nsec; + last_update = attr.st_mtim.tv_sec; if (check_update && last_update <= get_vrps_last_modified_date()) goto end2; diff --git a/src/rtr/pdu_handler.c b/src/rtr/pdu_handler.c index 00460cb1..35c62469 100644 --- a/src/rtr/pdu_handler.c +++ b/src/rtr/pdu_handler.c @@ -79,7 +79,14 @@ handle_serial_query_pdu(int fd, void *pdu) return send_cache_reset_pdu(&common); case DIFF_AVAILABLE: /* https://tools.ietf.org/html/rfc8210#section-8.2 */ - return send_commmon_exchange(&common); + /* + * TODO The diff calculation between serials isn't quite ready yet, + * so always respond with a cache reset. When the implementation is + * ready use: + * + * return send_commmon_exchange(&common); + */ + return send_cache_reset_pdu(&common); case NO_DIFF: /* Typical exchange with no Payloads */ error = send_cache_response_pdu(&common);