Opened 3 years ago

Last modified 21 months ago

#19987 new enhancement

Unit Test Guard, Middle, Exit, Intro, and Rend node choices

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: path-selection, testing, 032-unreached
Cc: catalyst Actual Points:
Parent ID: Points: 2
Reviewer: Sponsor: SponsorV-can

Description (last modified by teor)

We could unit test the #19973 fix to the 0.2.8.6 path selection issue by copying the code from test_choose_random_entry_no_guards,
but running it on:

  • choose_good_middle_server
  • choose_good_exit_server_general
  • router_choose_random_node (used by rend_consider_services_intro_points)
  • pick_rendezvous_node

The tests should make sure these functions return any node at random.
In 0.2.8.6, these functions chose nodes using the direct connection reachability rules, which was wrong.

We could make these tests simpler and more reliable by setting up a node list with a single node that 0.2.8.6 wouldn't choose, but 0.2.8.7 would. For example:

  • an IPv4-only node with ClientUseIPv4 0
  • a node on 9001/9030 with FascistFirewall 1
  • a node on 1.1.1.1 with ReachableAddresses 2.0.0.0/8

Child Tickets

Change History (10)

comment:1 Changed 3 years ago by teor

Description: modified (diff)

I'm not sure if I will get time to write this test, so I modified the description so it didn't look like I was volunteering.

comment:2 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:3 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:4 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:5 Changed 23 months ago by teor

Milestone: Tor: unspecifiedTor: 0.3.2.x-final
Summary: Unit Test Middle, Exit, Intro, and Rend node choicesUnit Test Guard, Middle, Exit, Intro, and Rend node choices

Given we've had two serious path selection issues in 0.2.8.6 (#19973) and 0.3.0.9 (#22753), we should probably do this sooner rather than later.

comment:6 Changed 23 months ago by arma

#17772 is another good ticket to look at for historical mistakes.

comment:7 Changed 23 months ago by catalyst

Cc: catalyst added

comment:8 Changed 23 months ago by nickm

#20050 is potentially useful here.

comment:9 Changed 23 months ago by nickm

Sponsor: SponsorV-can

comment:10 Changed 21 months ago by nickm

Keywords: 032-unreached added
Milestone: Tor: 0.3.2.x-finalTor: unspecified

Move some 0.3.2 items (fewer than I had expected for now) into Unspecified.

Note: See TracTickets for help on using tickets.