[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] entry_guard_pick_for_circuit(): TRAFFIC guards must have descriptors



commit 26957a127a80404ca243e50c3f0c2bac01e480b8
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Jan 31 11:46:06 2017 -0500

    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.
---
 src/or/entrynodes.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index c5fb92e..344b69d 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -2068,6 +2068,8 @@ entry_guard_pick_for_circuit(guard_selection_t *gs,
   // XXXX prop271 check Ed ID.
   if (! node)
     goto fail;
+  if (BUG(usage != GUARD_USAGE_DIRGUARD && !node_has_descriptor(node)))
+    goto fail;
 
   *chosen_node_out = node;
   *guard_state_out = tor_malloc_zero(sizeof(circuit_guard_state_t));



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits