It is possible in normal circumstances that a client fetches a descriptor
that has a lower revision counter than the one in its cache. This can happen
due to HSDir desync.
Fixes #24976
Signed-off-by: David Goulet <dgoulet@torproject.org>
--- /dev/null
+ o Minor bugfixes (hidden service v3 client):
+ - Remove a BUG() statement which can be triggered in normal circumstances
+ where a client fetches a descriptor that has a lower revision counter
+ than the one in its cache. This can happen due to HSDir desync. Fixes
+ bug 24976; bugfix on 0.3.2.1-alpha.
if (cache_entry != NULL) {
/* If we have an entry in our cache that has a revision counter greater
* than the one we just fetched, discard the one we fetched. */
- if (BUG(cache_entry->desc->plaintext_data.revision_counter >
- client_desc->desc->plaintext_data.revision_counter)) {
+ if (cache_entry->desc->plaintext_data.revision_counter >
+ client_desc->desc->plaintext_data.revision_counter) {
cache_client_desc_free(client_desc);
goto done;
}