Skip to content

When DisableNetwork is 1 but !circuit_enough_testing_circs(), we can still launch circuits

In consider_testing_reachability(), we check

  if (test_or && (!orport_reachable || !circuit_enough_testing_circs())) {

Once legacy/trac#18616 (moved) is merged, the first function will return 1 for orport_reachable when DisableNetwork is 1, so that bug will go away.

But it will remain the case that if !circuit_enough_testing_circs(), we will proceed to call circuit_launch_by_extend_info(), even when DisableNetwork is 1.

There are four places that call consider_testing_reachability():

  • circuitbuild.c:circuit_send_next_onion_skin()
  • circuituse.c:circuit_testing_opened()
  • main.c:directory_info_has_arrived()
  • main.c:check_for_reachability_bw_callback()

I think the middle two are safe, since they shouldn't happen while DisableNetwork is set.

I think the first one is iffy, since it's called from a bunch of places so I'm not sure, but given the name I hope it doesn't get called during DisableNetwork.

And I think the fourth one is bad news, since it gets called periodically and doesn't check DisableNetwork.

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