From: Alberto Leiva Popper Date: Thu, 9 Nov 2023 23:51:43 +0000 (-0600) Subject: Patch FIXME: Fall back to snapshot when deltas fail X-Git-Tag: 1.6.0~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7839e693a59b215d89f03a720d4e75ce4819f04;p=thirdparty%2FFORT-validator.git Patch FIXME: Fall back to snapshot when deltas fail --- diff --git a/src/rrdp.c b/src/rrdp.c index 83edc408..44f95528 100644 --- a/src/rrdp.c +++ b/src/rrdp.c @@ -923,7 +923,6 @@ handle_deltas(struct update_notification *notif, struct rrdp_serial *serial) } if (BN_is_negative(diff_bn)) { BN_free(diff_bn); - /* FIXME delete RPP and fall back to snapshot */ return pr_val_err("Cached delta's serial [%s] is larger than Notification's current serial [%s].", serial->str, notif->session.serial.str); } @@ -1022,6 +1021,10 @@ rrdp_update(struct rpki_uri *uri) if (BN_cmp(old.serial.num, new.session.serial.num) != 0) { pr_val_debug("The Notification's serial changed."); error = handle_deltas(&new, &old.serial); + if (error) { + pr_val_debug("Falling back to snapshot."); + error = handle_snapshot(&new); + } goto revert_notification; }