Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #15816

Closed (moved)
(moved)
Open
Created Apr 25, 2015 by Yawning Angel@yawning

HS Descriptor Fetch retry behavior is broken.

#14847 (moved) broke the HS descriptor retry logic.

rendclient.c:lookup_last_hid_serv_request()

  base32_encode(hsdir_id_base32, sizeof(hsdir_id_base32),
                hs_dir->identity_digest, DIGEST_LEN);
  tor_snprintf(hsdir_desc_comb_id, sizeof(hsdir_desc_comb_id), "%s%s",
               hsdir_id_base32,
               desc_id_base32);

This used to be onion address based, but was changed to be the descriptor ID, which is ok.

rendclient.c:purge_hid_serv_from_last_hid_serv_requests()

    if (tor_memeq(key + LAST_HID_SERV_REQUEST_KEY_LEN -
                  REND_SERVICE_ID_LEN_BASE32,
                  onion_address,
                  REND_SERVICE_ID_LEN_BASE32)) {
      iter = strmap_iter_next_rmv(last_hid_serv_requests, iter);
      tor_free(val);
    } else {

This needs a corresponding change. The routine is called from rend_client_desc_trynow() if the fetch 404s to ensure that applications aren't stuck waiting for 15 mins if a fetch happens to fail.

Fixing this will also fix "HSFETCH" not always actually sending all the events back (particularly if the descriptor is missing, and a subsequent HSFETCH is issued).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking