]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Force cache reset on db update, use millisecs at last update of db file
authorpcarana <pc.moreno2099@gmail.com>
Tue, 5 Mar 2019 21:31:22 +0000 (15:31 -0600)
committerpcarana <pc.moreno2099@gmail.com>
Tue, 5 Mar 2019 21:31:22 +0000 (15:31 -0600)
src/csv.c
src/rtr/pdu_handler.c

index ec852ca76a0139fd9475a23ab5f04b1446bf5692..c3b5bb64f902ca77b748a56ff55f7fc2d0a0183b 100644 (file)
--- 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;
 
index 00460cb1ccd00f504bfb7c60c5151f6bb360041d..35c624697e4194efd17df6b1a59b881c4600a95e 100644 (file)
@@ -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);