[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.4.5] hs-v2: Disable version 2 service
commit 765bdb9c3331a0fdbf15406db82fa4a29d6651b4
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date: Thu Sep 30 10:32:05 2021 -0400
hs-v2: Disable version 2 service
The minimum service version is raised from 2 to 3 which effectively
disable loading or creating an onion service v2.
As for ADD_ONION, for version 2, a 551 error is returned:
"551 Failed to add Onion Service"
Part of #40476
Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
src/feature/control/control.c | 8 +++++---
src/feature/hs/hs_common.h | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/feature/control/control.c b/src/feature/control/control.c
index 26ac12d307..8185218a9f 100644
--- a/src/feature/control/control.c
+++ b/src/feature/control/control.c
@@ -4653,11 +4653,13 @@ add_onion_helper_add_service(int hs_version,
tor_assert(port_cfgs);
tor_assert(address_out);
+ /* Version 2 is disabled. */
+ (void) auth_type;
+ (void) auth_clients;
+
switch (hs_version) {
case HS_VERSION_TWO:
- ret = rend_service_add_ephemeral(pk->v2, port_cfgs, max_streams,
- max_streams_close_circuit, auth_type,
- auth_clients, address_out);
+ ret = RSAE_INTERNAL;
break;
case HS_VERSION_THREE:
ret = hs_service_add_ephemeral(pk->v3, port_cfgs, max_streams,
diff --git a/src/feature/hs/hs_common.h b/src/feature/hs/hs_common.h
index a44505930a..94cdf5abc4 100644
--- a/src/feature/hs/hs_common.h
+++ b/src/feature/hs/hs_common.h
@@ -25,7 +25,7 @@ struct ed25519_keypair_t;
/* Version 3 of the protocol (prop224). */
#define HS_VERSION_THREE 3
/* Earliest and latest version we support. */
-#define HS_VERSION_MIN HS_VERSION_TWO
+#define HS_VERSION_MIN HS_VERSION_THREE
#define HS_VERSION_MAX HS_VERSION_THREE
/** Try to maintain this many intro points per service by default. */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits