From 3580e8406b2d605d1d0f75347f30262aaa05f331 Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 15 Apr 2021 08:58:46 +0000 Subject: [PATCH] Do not only check the serial number but also the session_id before 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rpki-client/rrdp_notification.c b/usr.sbin/rpki-client/rrdp_notification.c index 7381e0ee660..6ad1006d921 100644 --- a/usr.sbin/rpki-client/rrdp_notification.c +++ b/usr.sbin/rpki-client/rrdp_notification.c @@ -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"); } -- 2.20.1