summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-07 10:21:40 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-07 10:21:40 -0400
commit56e8d84ea3e5110c676c165882570b5cc37e946d (patch)
treee0eeb241a928142e865e1647ed6e5c8010650ea9
parent58b87a2c596185b2b7ef84d49fecbc603b5467d0 (diff)
parent984a28f3e502c6df9e28057c3e934b98df83d8e9 (diff)
downloadtor-56e8d84ea3e5110c676c165882570b5cc37e946d.tar.gz
tor-56e8d84ea3e5110c676c165882570b5cc37e946d.zip
Merge branch 'ticket31548_035_01_squashed'
-rw-r--r--changes/ticket315487
-rw-r--r--src/feature/hs/hs_service.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/changes/ticket31548 b/changes/ticket31548
new file mode 100644
index 0000000000..fef0b5d01f
--- /dev/null
+++ b/changes/ticket31548
@@ -0,0 +1,7 @@
+ o Major bugfixes (hidden service v3):
+ - Make onion service always use the exact amount of configured intro points
+ (or less due to node exlusion). Before, a service could sometimes pick
+ more intro points than configured with the
+ HiddenServiceNumIntroductionPoints option. Fixes bug 31548; bugfix on
+ 0.3.2.1-alpha.
+
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 7021190903..f81987f69f 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -1659,6 +1659,15 @@ build_desc_intro_points(const hs_service_t *service,
DIGEST256MAP_FOREACH(desc->intro_points.map, key,
const hs_service_intro_point_t *, ip) {
+ if (!ip->circuit_established) {
+ /* Ignore un-established intro points. They can linger in that list
+ * because their circuit has not opened and they haven't been removed
+ * yet even though we have enough intro circuits.
+ *
+ * Due to #31561, it can stay in that list until rotation so this check
+ * prevents to publish an intro point without a circuit. */
+ continue;
+ }
hs_desc_intro_point_t *desc_ip = hs_desc_intro_point_new();
if (setup_desc_intro_point(&desc->signing_kp, ip, now, desc_ip) < 0) {
hs_desc_intro_point_free(desc_ip);