From a820189d575972ccccf948d9da1b79e81c8665c3 Mon Sep 17 00:00:00 2001 From: Shane Alcock Date: Fri, 20 Mar 2026 17:14:29 +1300 Subject: [PATCH] Do not include dataAddedSince to broker queries for historical data This was causing large historical queries that get paginated to fail after the first paginated response, as dataAddedSince was always set to the current walltime. --- lib/datainterfaces/bsdi_broker.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/datainterfaces/bsdi_broker.c b/lib/datainterfaces/bsdi_broker.c index 0e297ed3..897d5bf0 100644 --- a/lib/datainterfaces/bsdi_broker.c +++ b/lib/datainterfaces/bsdi_broker.c @@ -902,6 +902,7 @@ void bsdi_broker_destroy(bsdi_t *di) int bsdi_broker_update_resources(bsdi_t *di) { + bgpstream_filter_mgr_t *filter_mgr = BSDI_GET_FILTER_MGR(di); // we need to set two parameters: // - dataAddedSince ("time" from last response we got) @@ -919,7 +920,8 @@ int bsdi_broker_update_resources(bsdi_t *di) int success = 0; - if (STATE->last_response_time > 0) { + if (STATE->last_response_time > 0 && + (TIF == NULL || TIF->end_time == BGPSTREAM_FOREVER)) { // need to add dataAddedSince if (snprintf(buf, BUFLEN, "%" PRIu32, STATE->last_response_time) >= BUFLEN) {