diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2017-06-23 16:53:39 -0400 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2017-06-23 16:53:39 -0400 |
commit | 79e2e4d3cbabff41675aa1f7defb67f4acba398c (patch) | |
tree | 9c1eba60e3b72c7deef375dc37020fe3f22db9a3 /src/or/channel.c | |
parent | 784b29a2bfc7b7ce5ef355629528a38c50b81908 (diff) | |
download | tor-79e2e4d3cbabff41675aa1f7defb67f4acba398c.tar.gz tor-79e2e4d3cbabff41675aa1f7defb67f4acba398c.zip |
Ticket #17857: Padding off-switch for single hop connections
This doesn't apply to currently active connections.. yet...
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index df6d7d3423..8348ffd649 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -65,6 +65,7 @@ #include "routerlist.h" #include "scheduler.h" #include "compat_time.h" +#include "networkstatus.h" /* Global lists of channels */ @@ -2711,7 +2712,11 @@ channel_do_open_actions(channel_t *chan) /* Disable or reduce padding according to user prefs. */ if (chan->padding_enabled || get_options()->ConnectionPadding == 1) { - if (!get_options()->ConnectionPadding) { + if (!get_options()->ConnectionPadding || + (get_options()->Tor2webMode && + !networkstatus_get_param(NULL, "nf_pad_tor2web", 1, 0, 1)) + || (get_options()->HiddenServiceSingleHopMode && + !networkstatus_get_param(NULL, "nf_pad_single_onion", 1, 0, 1))) { channelpadding_disable_padding_on_channel(chan); } |