Skip to content

tor-chanmgr: support multiple channels for a relay ID

opara requested to merge opara/arti:orport into main

This is progress towards #1633 (closed).

The new channel manager code is a bit more restrictive when returning pending channels (the relay IDs of the pending channel must now be a subset of the target's relay IDs, not just overlapping). I think C tor doesn't allow returning pending channels for circuit extension requests, but I think we can in some limited (but common) cases.

Some other changes:

  • tor-linkspec: impl HasAddrs for &T
  • tor-linkspec: add ListByRelayIds
  • tor-basic-utils: add n_key_list macro (based on the n_key_set macro)

Next steps after this MR are to expose the channel's peer IP address and channel creation time from the channel in a way that we can implement things like canonical channels. But I still have some open questions about things like handling PT channels. I also want to improve the cleanup process for channels since opened channels are only cleaned on a timer, and pending channel cleanup is brittle.

Edited by opara

Merge request reports

Loading