aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/protover.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-11-05 09:15:10 -0400
committerNick Mathewson <nickm@torproject.org>2021-11-05 09:20:05 -0400
commit7c085490f5324f374dd7caa570dff5902f0e32cc (patch)
tree22d6188714e17c77e409f5bbe29c7339d6c89316 /src/core/or/protover.c
parentcfd1482f78b4542703b078587c5d52309ce8b999 (diff)
downloadtor-7c085490f5324f374dd7caa570dff5902f0e32cc.tar.gz
tor-7c085490f5324f374dd7caa570dff5902f0e32cc.zip
Add scary warnings about changing the protover list.
Doing this in the wrong way has potential to cause serious havoc on the network, so let's make it harder for future programmers to mess it up.
Diffstat (limited to 'src/core/or/protover.c')
-rw-r--r--src/core/or/protover.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/core/or/protover.c b/src/core/or/protover.c
index dfb0e9e303..a882d1a77d 100644
--- a/src/core/or/protover.c
+++ b/src/core/or/protover.c
@@ -377,11 +377,31 @@ protocol_list_supports_protocol_or_later(const char *list,
}
/** Return the canonical string containing the list of protocols
- * that we support. */
+ * that we support.
+ **/
/// C_RUST_COUPLED: src/rust/protover/protover.rs `SUPPORTED_PROTOCOLS`
const char *
protover_get_supported_protocols(void)
{
+ /*
+ * WARNING!
+ *
+ * Be EXTREMELY CAREFUL when *removing* versions from this list. If you
+ * remove an entry while it still appears as "recommended" in the consensus,
+ * you'll cause all the instances without it to warn. If you remove an entry
+ * while it still appears as "required" in the consensus, you'll cause
+ * all the instances without it to refuse to connect to the network, and
+ * shut down.
+ *
+ * If you need to remove a version from this list, you need to make sure
+ * that it is not listed in the _current consensuses_: just removing it from
+ * the required list in dirvote.c is NOT ENOUGH. You need to remove it from
+ * the required list dirvote.c, and THEN let the authorities update and vote
+ * on new consensuses without it. Only once those consensuses are out is
+ * it safe to remove from this list.
+ *
+ * WARNING!
+ */
return
"Cons=1-2 "
"Desc=1-2 "