Do not only check the serial number but also the session_id before
authorclaudio <claudio@openbsd.org>
Thu, 15 Apr 2021 08:58:46 +0000 (08:58 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 15 Apr 2021 08:58:46 +0000 (08:58 +0000)
adding a delta to the queue. If the session_id differs there is no
need for deltas since a snapshot must be fetched.
OK job@ benno@ deraadt@

usr.sbin/rpki-client/rrdp_notification.c

index 7381e0e..6ad1006 100644 (file)
@@ -243,7 +243,9 @@ start_delta_elem(struct notification_xml *nxml, const char **attr)
 
        /* optimisation, add only deltas that could be interesting */
        if (nxml->repository->serial != 0 &&
-           nxml->repository->serial < delta_serial) {
+           nxml->repository->serial < delta_serial &&
+           nxml->repository->session_id != NULL &&
+           strcmp(nxml->session_id, nxml->repository->session_id) == 0) {
                if (add_delta(nxml, delta_uri, delta_hash, delta_serial) == 0)
                        PARSE_FAIL(p, "parse failed - adding delta failed");
        }