aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-05-07 21:03:31 +1000
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-05-07 21:03:31 +1000
commit35217f0f61c633efe1f6e5ecab18d1700b9d570b (patch)
tree16d21fb1a1ae4cfa7a85e9e142718de21cda3726 /src/or/circuitbuild.c
parent2da2718609841bb7028ae2c802e26d80c857fe90 (diff)
downloadtor-35217f0f61c633efe1f6e5ecab18d1700b9d570b.tar.gz
tor-35217f0f61c633efe1f6e5ecab18d1700b9d570b.zip
Fix two log messages that mistakenly log 0-based hop counts
(torspec says hop counts are 1-based.) Closes ticket 18982, bugfix on 0275b6876 in tor 0.2.6.2-alpha and 907db008a in tor 0.2.4.5-alpha. Credit to Xiaofan Li for reporting this issue.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index e6fe3f0c37..48e4b75ff9 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2112,7 +2112,7 @@ choose_good_middle_server(uint8_t purpose,
purpose <= CIRCUIT_PURPOSE_MAX_);
log_debug(LD_CIRC, "Contemplating intermediate hop %d: random choice.",
- cur_len);
+ cur_len+1);
excluded = smartlist_new();
if ((r = build_state_get_exit_node(state))) {
nodelist_add_node_and_family(excluded, r);
@@ -2263,7 +2263,7 @@ onion_extend_cpath(origin_circuit_t *circ)
if (!info) {
log_warn(LD_CIRC,"Failed to find node for hop %d of our path. Discarding "
- "this circuit.", cur_len);
+ "this circuit.", cur_len+1);
return -1;
}