mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
entry_guard_pick_for_circuit(): TRAFFIC guards must have descriptors
This relates to the 21242 fix -- entry_guard_pick_for_circuit() should never yield nodes without descriptors when the node is going to be used for traffic, since we won't be able to extend through them.
This commit is contained in:
parent
93b39c5162
commit
26957a127a
@ -2068,6 +2068,8 @@ entry_guard_pick_for_circuit(guard_selection_t *gs,
|
|||||||
// XXXX prop271 check Ed ID.
|
// XXXX prop271 check Ed ID.
|
||||||
if (! node)
|
if (! node)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
if (BUG(usage != GUARD_USAGE_DIRGUARD && !node_has_descriptor(node)))
|
||||||
|
goto fail;
|
||||||
|
|
||||||
*chosen_node_out = node;
|
*chosen_node_out = node;
|
||||||
*guard_state_out = tor_malloc_zero(sizeof(circuit_guard_state_t));
|
*guard_state_out = tor_malloc_zero(sizeof(circuit_guard_state_t));
|
||||||
|
Loading…
Reference in New Issue
Block a user