node_get_pref_ipv6_orport() and node_get_prim_orport() check addresses in the following order:
routerinfo / descriptor (modified by rewrite_bridge_address_for_node())
routerstatus / consensus
microdesc
Clients, bridge clients, and relays usually get the correct address from node_get_pref_ipv6_orport() and node_get_prim_orport(), whether they are using microdescriptors or not.
But there are a few cases when this breaks:
bridge clients should only check routerinfo for configured bridges
all clients and relays that use microdescs should never check full descriptors (and vice versa, except for the bridge case)
all clients and relays that use full descriptors should ignore the IPv6 address in the descriptor
all clients and relays that use microdescriptors should ignore the IPv6 address in the microdescriptor, when using a consensus method that puts IPv6 addresses in the microdesc consensus, otherwise they should use the microdescriptor
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
We should probably fix the onion key functions as well when we do this, and any other functions that implement a similar pattern of directory document checks. This depends on #23966 (moved).
Making tor stop looking at unused directory documents is now #24731 (moved). This includes the bridge routerinfo checks.
Removing unused IPv6 DirPort code is now #24732 (moved).
Trac: Sponsor: N/Ato SponsorV-can Summary: Make node_get_*_orport() check addresses in the right order to Make node_get_pref_ipv6_orport() check addresses in the right order Actualpoints: 1 to 2
It makes sure we ignore microdescs when the consensus has IPv6 ORPorts.
And it refactors some of the address functions so they depend on the revised code.
It also contains the cherry-picked commit from #24736 (moved) branch bug24736_028, because it is required for the unit tests to pass.
Looks plausible! It's good to see so much complexity removed here.
I think we already merged #24736 (moved), so I'll assume we rebase before the merge to drop 189127acf2014907eac747e25d32668741dc2c5e ?
Let's add a comment to document SET_IPV6_AP. We should especially document that it conditionally returns, possibly by renaming it: macros that alter control flow should make it obvious.
Other than that, I think I like this. How is the test coverage for all the functions in policies.c that we modify?
Edit: fix ticket number (teor)
Trac: Status: needs_review to needs_revision Reviewer: N/Ato nickm
These needs_revision, tickets, tagged with 034-removed-*, are no longer in-scope for 0.3.4. We can reconsider any of them, if somebody does the necessary revision.
Trac: Milestone: Tor: 0.3.4.x-final to Tor: unspecified
When #25691 (moved) merges, we should rebase this branch on top of it, and use the new has_preferred_descriptor() function.
(Or perhaps create a similar function that actually returns some of the fields.)