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

[tor-commits] [tor/maint-0.3.4] node: Make node_supports_v3_rendezvous_point() also check for the key



commit b063ca0604d6cc99adf1009818c10ee14d006aab
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Thu Sep 20 08:50:27 2018 -0400

    node: Make node_supports_v3_rendezvous_point() also check for the key
    
    It is not enough to look at protover for v3 rendezvous support but also we
    need to make sure that the curve25519 onion key is present or in other words
    that the descriptor has been fetched and does contain it.
    
    Fixes #27797.
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 changes/ticket27797 | 5 +++++
 src/or/nodelist.c   | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/changes/ticket27797 b/changes/ticket27797
new file mode 100644
index 000000000..f07e35f84
--- /dev/null
+++ b/changes/ticket27797
@@ -0,0 +1,5 @@
+  o Minor bugfixes (node, hidden service v3):
+    - When selecting a v3 rendezvous point, not only look at the protover but
+      also if the curve25519 onion key is present. That way we avoid picking a
+      node that supports the v3 rendezvous but for which we don't have the
+      descriptor yet for the key. Fixes bug 27797; bugfix on 0.3.2.1-alpha.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index fcd5e0220..032e8d669 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1153,6 +1153,11 @@ node_supports_v3_rendezvous_point(const node_t *node)
 {
   tor_assert(node);
 
+  /* We can't use a v3 rendezvous point without the curve25519 onion pk. */
+  if (!node_get_curve25519_onion_key(node)) {
+    return 0;
+  }
+
   return node_get_protover_summary_flags(node)->supports_v3_rendezvous_point;
 }
 

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