aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/protover.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2018-10-23 20:55:10 +0000
committerGeorge Kadianakis <desnacked@riseup.net>2019-01-02 15:12:16 +0200
commit659a4f06d46a0e8e4f391eda3b6d86f2ab6e4db9 (patch)
treef33207b1bf0355076b244b161b2bb093c8840c34 /src/core/or/protover.c
parent70e9245f6feecceee96f0ea8d426e1a5a6fc9b8d (diff)
downloadtor-659a4f06d46a0e8e4f391eda3b6d86f2ab6e4db9.tar.gz
tor-659a4f06d46a0e8e4f391eda3b6d86f2ab6e4db9.zip
Circuit padding ProtoVer plumbing.
This helps us to determine if a middle node can pad to us or not. Co-authored-by: George Kadianakis <desnacked@riseup.net>
Diffstat (limited to 'src/core/or/protover.c')
-rw-r--r--src/core/or/protover.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/or/protover.c b/src/core/or/protover.c
index e80fbfae81..c0c09c9d17 100644
--- a/src/core/or/protover.c
+++ b/src/core/or/protover.c
@@ -39,6 +39,9 @@ static int protocol_list_contains(const smartlist_t *protos,
static const struct {
protocol_type_t protover_type;
const char *name;
+/* If you add a new protocol here, you probably also want to add
+ * parsing for it in routerstatus_parse_entry_from_string() so that
+ * it is set in routerstatus_t */
} PROTOCOL_NAMES[] = {
{ PRT_LINK, "Link" },
{ PRT_LINKAUTH, "LinkAuth" },
@@ -49,6 +52,7 @@ static const struct {
{ PRT_HSREND, "HSRend" },
{ PRT_DESC, "Desc" },
{ PRT_MICRODESC, "Microdesc"},
+ { PRT_PADDING, "Padding"},
{ PRT_CONS, "Cons" }
};
@@ -396,7 +400,8 @@ protover_get_supported_protocols(void)
"LinkAuth=3 "
#endif
"Microdesc=1-2 "
- "Relay=1-2";
+ "Relay=1-2 "
+ "Padding=1";
}
/** The protocols from protover_get_supported_protocols(), as parsed into a