diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-05-13 14:33:31 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-05-13 14:33:31 -0400 |
commit | 9ad2eb8f73b70292e36511424d676b223d4cdff0 (patch) | |
tree | 844aa082c47e7d4a76befda6fdc7dc668f8e4284 /src/app | |
parent | c6523a6398efb07831ede8234486ee8f385ed558 (diff) | |
parent | 507df74b319f37462d1540495f04b9b0838cb3a3 (diff) | |
download | tor-9ad2eb8f73b70292e36511424d676b223d4cdff0.tar.gz tor-9ad2eb8f73b70292e36511424d676b223d4cdff0.zip |
Merge branch 'bug28683_30173_29203_squashed'
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/config/config.c | 10 | ||||
-rw-r--r-- | src/app/config/or_options_st.h | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index 26a3061a26..e601bb2ecd 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -597,6 +597,8 @@ static config_var_t option_vars_[] = { V(ReducedConnectionPadding, BOOL, "0"), V(ConnectionPadding, AUTOBOOL, "auto"), V(RefuseUnknownExits, AUTOBOOL, "auto"), + V(CircuitPadding, BOOL, "1"), + V(ReducedCircuitPadding, BOOL, "0"), V(RejectPlaintextPorts, CSV, ""), V(RelayBandwidthBurst, MEMUNIT, "0"), V(RelayBandwidthRate, MEMUNIT, "0"), @@ -3744,6 +3746,14 @@ options_validate(or_options_t *old_options, or_options_t *options, REJECT("Relays cannot set ReducedConnectionPadding. "); } + if (server_mode(options) && options->CircuitPadding == 0) { + REJECT("Relays cannot set CircuitPadding to 0. "); + } + + if (server_mode(options) && options->ReducedCircuitPadding == 1) { + REJECT("Relays cannot set ReducedCircuitPadding. "); + } + if (options->BridgeDistribution) { if (!options->BridgeRelay) { REJECT("You set BridgeDistribution, but you didn't set BridgeRelay!"); diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h index bd707fd193..4e03bec7fa 100644 --- a/src/app/config/or_options_st.h +++ b/src/app/config/or_options_st.h @@ -248,6 +248,17 @@ struct or_options_t { * pad to the server regardless of server support. */ int ConnectionPadding; + /** Boolean: if true, then circuit padding will be negotiated by client + * and server, subject to consenus limits (default). If 0, it will be fully + * disabled. */ + int CircuitPadding; + + /** Boolean: if true, then this client will only use circuit padding + * algorithms that are known to use a low amount of overhead. If false, + * we will use all available circuit padding algorithms. + */ + int ReducedCircuitPadding; + /** To what authority types do we publish our descriptor? Choices are * "v1", "v2", "v3", "bridge", or "". */ struct smartlist_t *PublishServerDescriptor; |