Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#4838 closed defect (fixed)

A directory cache will never purge some old descriptors

Reported by: fermenthor Owned by:
Priority: Medium Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


By default, caches don't try to download v2 statuses so have_enough_v2 in routerlist_remove_old_routers() is always false. This is similar to #3543.

I've come up with this modification to check whether we do v2 at all:

+  const or_options_t *options = get_options();
   have_enough_v2 = !caches ||
+    !(authdir_mode_any_main(options) || options->FetchV2Networkstatus) ||
     (networkstatus_v2_list &&
      smartlist_len(networkstatus_v2_list) > get_n_v2_authorities() / 2);

Child Tickets

Change History (6)

comment:1 Changed 9 years ago by nickm

Milestone: Tor: 0.2.2.x-final
Status: newneeds_review

This looks good to me. Should we credit the patch to "fermenthor", or is there another name you'd like to use?

comment:2 Changed 9 years ago by nickm

On second thought, I think maybe we should not fix this in 0.2.2. It could have hard-to-predict effects. Or perhaps we should up the cutoff here to 36 hours, just in case?

comment:3 Changed 9 years ago by fermenthor

The cutoff here is already at 48 hrs:

#define ROUTER_MAX_AGE (60*60*48)

comment:4 Changed 9 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged into master as f7e87f41f719f42; thanks!

comment:5 Changed 8 years ago by nickm

Keywords: tor-relay added

comment:6 Changed 8 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.