diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-11-01 10:28:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-11-01 10:28:01 -0400 |
commit | 12dc55f4878d16bfc3fb6789b31494d47df7ccec (patch) | |
tree | fc98af22b5c8ec89902f579fba8ffb9e2d3d77fe /src/or/circuitbuild.c | |
parent | dde41fa1b00151e01e11341903069f5b2f0db1b7 (diff) | |
parent | 5de88dda0acda6914bacd1e14c2e037798c5d9d9 (diff) | |
download | tor-12dc55f4878d16bfc3fb6789b31494d47df7ccec.tar.gz tor-12dc55f4878d16bfc3fb6789b31494d47df7ccec.zip |
Merge branch 'prop221_squashed_024'
Conflicts:
src/or/or.h
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index a120b46592..8e6bb59ef3 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -585,16 +585,18 @@ should_use_create_fast_for_circuit(origin_circuit_t *circ) if (!circ->cpath->extend_info->onion_key) return 1; /* our hand is forced: only a create_fast will work. */ - if (!options->FastFirstHopPK) - return 0; /* we prefer to avoid create_fast */ if (public_server_mode(options)) { /* We're a server, and we know an onion key. We can choose. * Prefer to blend our circuit into the other circuits we are * creating on behalf of others. */ return 0; } + if (options->FastFirstHopPK == -1) { + /* option is "auto", so look at the consensus. */ + return networkstatus_get_param(NULL, "usecreatefast", 1, 0, 1); + } - return 1; + return options->FastFirstHopPK; } /** Return true if <b>circ</b> is the type of circuit we want to count |