summaryrefslogtreecommitdiff
path: root/proto/rpki/rpki.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-11-07 10:09:01 +0100
committerMaria Matejka <mq@ucw.cz>2022-11-07 10:09:01 +0100
commit34e803c6c32032cffeb9bd230d0f85861acd9222 (patch)
treee73c48ab8cfe3fb2f9cee11f4031953292481143 /proto/rpki/rpki.c
parentd2d83c47776e1655a73e9134c87590bae084b03b (diff)
parent54430df953d6c590e5f446530a21d18277eeda56 (diff)
Merge commit '54430df9' into thread-next
Diffstat (limited to 'proto/rpki/rpki.c')
-rw-r--r--proto/rpki/rpki.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c
index 7ec8d72f..e5638aff 100644
--- a/proto/rpki/rpki.c
+++ b/proto/rpki/rpki.c
@@ -299,12 +299,13 @@ rpki_cache_change_state(struct rpki_cache *cache, const enum rpki_cache_state ne
case RPKI_CS_NO_INCR_UPDATE_AVAIL:
/* Server was unable to answer the last Serial Query and sent Cache Reset. */
- rpki_cache_change_state(cache, RPKI_CS_RESET);
- break;
-
case RPKI_CS_ERROR_NO_DATA_AVAIL:
/* No validation records are available on the cache server. */
- rpki_cache_change_state(cache, RPKI_CS_RESET);
+
+ if (old_state == RPKI_CS_ESTABLISHED)
+ rpki_cache_change_state(cache, RPKI_CS_RESET);
+ else
+ rpki_schedule_next_retry(cache);
break;
case RPKI_CS_ERROR_FATAL:
@@ -488,6 +489,11 @@ rpki_retry_hook(timer *tm)
}
break;
+ case RPKI_CS_NO_INCR_UPDATE_AVAIL:
+ case RPKI_CS_ERROR_NO_DATA_AVAIL:
+ rpki_cache_change_state(cache, RPKI_CS_RESET);
+ break;
+
default:
rpki_cache_change_state(cache, RPKI_CS_CONNECTING);
break;