aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
AgeCommit message (Collapse)Author
2012-06-15Triage the XXX023 and XXX022 comments: postpone many.Nick Mathewson
2012-06-15Downgrade log messages about cbt enabled/disabled. Bug 6169.Nick Mathewson
2012-06-15another little step at making debugging 5458 easierRoger Dingledine
2012-06-14Lower the default path bias notice rate to 40%.Mike Perry
I saw 72% on a test run with 26 circuits. 70% might be a little close to the line. That, or min_circs is too low and we need to be more patient. We still need to test/simulate more.
2012-06-14For now, never disable any guards.Mike Perry
2012-06-14Defend against entry node path bias attacksMike Perry
The defense counts the circuit failure rate for each guard for the past N circuits. Failure is defined as the ability to complete a first hop, but not finish completing the circuit all the way to the exit. If the failure rate exceeds a certain amount, a notice is emitted. If it exceeds a greater amount, a warn is emitted and the guard is disabled. These values are governed by consensus parameters which we intend to tune as we perform experiments and statistical simulations.
2012-06-14Merge remote-tracking branch 'asn-mytor/bug5589_take2'Nick Mathewson
2012-06-14Remove validate_pluggable_transports_config(): redundant since 9d9b5ed0.George Kadianakis
The warning message of validate_pluggable_transports_config() is superseded by the changes in the warning message of connection_or_connect() when the proxy credentials can't be found.
2012-06-13Satisfy make check-spacesAndrea Shepard
2012-06-13Move cbt->liveness.timeouts_after_firsthop free code into its own functionAndrea Shepard
2012-06-13Early exit from circuit_build_times_set_timeout() if adaptive timeouts are ↵Andrea Shepard
disabled
2012-06-13Use K&R styleAndrea Shepard
2012-06-13Unconditionally use config CircuitBuildTimeout if LearnCircuitBuildTimeout ↵Andrea Shepard
is disabled
2012-06-13Don't track circuit timeout history unless we're actually using adaptive ↵Andrea Shepard
timeouts
2012-06-13Add debug logging to circuit_build_times_* of circuitbuild.c to trace ↵Andrea Shepard
queries of consensus parameters for bug 5049
2012-06-05Merge branch 'bug5603'Nick Mathewson
2012-06-05Minor changes to bug5603Nick Mathewson
* Minor stylistic changes to comments and doxygen * Use strcmp_opt; it already exists. * Tighten bridge_has_digest implementation a little.
2012-06-04Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson
2012-06-04Add about 60 more DOCDOC comments to 0.2.3Nick Mathewson
Also, try to resolve some doxygen issues. First, define a magic "This is doxygen!" macro so that we take the correct branch in various #if/#else/#endifs in order to get the right documentation. Second, add in a few grouping @{ and @} entries in order to get some variables and fields to get grouped together.
2012-06-03Improve conflict resolution when adding new bridges.George Kadianakis
2012-05-18Use a more helpful log message when we can't find a proxy.George Kadianakis
2012-05-16Remove over-two-months-old entry guards even while running.Roger Dingledine
Previously, we only did this check at startup, which could lead to us holding a guard indefinitely, and give weird results. Fixes bug 5380; bugfix on 0.2.1.14-rc. (Patch by Roger; changes file and commit message by Nick)
2012-05-16Correct documentation for remove_obsolete_entry_guards.Nick Mathewson
2012-05-11When no usable exit satisfies a predicted port, stop predicting it.Nick Mathewson
Fix for bug 3296.
2012-04-12Trivially refactor validate_pluggable_transports_config().George Kadianakis
* Remove the ugly if statement. * constify 'bridge_info_t' in SMARTLIST_FOREACH_BEGIN.
2012-04-12Improve the message of validate_pluggable_transports_config().George Kadianakis
2012-03-27Refactor the API for setting up a block cipher.Nick Mathewson
It allows us more flexibility on the backend if the user needs to specify the key and IV at setup time.
2012-03-09Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/or/circuitbuild.c
2012-03-09Never choose a bridge as an exit. Bug 5342.Nick Mathewson
2012-02-12Unpack a smartlist_foreach and add an assert: try to hunt #5102Nick Mathewson
2012-01-27if we ever have an old bridge, never again use microdescsRoger Dingledine
should reduce the risk of oscillation if our 0.2.2 bridge comes and goes
2012-01-25Allow 0.2.3.x clients to use 0.2.2.x bridges.Roger Dingledine
Previously the client would ask the bridge for microdescriptors, which are only supported in 0.2.3.x and later, and then fail to bootstrap when it didn't get the answers it wanted. Fixes bug 4013; bugfix on 0.2.3.2-alpha. The fix here is to revert to using normal descriptors if any of our bridges are known to not support microdescs. This is not ideal, a) because we'll start downloading a microdesc consensus as soon as we get a bridge descriptor, and that will waste time if we later get a bridge descriptor that tells us we don't like microdescriptors; and b) by changing our mind we're leaking to our other bridges that we have an old-version bridge. The alternate fix would have been to change we_use_microdescriptors_for_circuits() to ask if *any* of our bridges can support microdescriptors, and then change the directory logic that picks a bridge to only select from those that do. For people living in the future, where 0.2.2.x is obsolete, there won't be a difference. Note that in either of these potential fixes, we have risk of oscillation if our one funny-looking bridges goes away / comes back.
2012-01-18Rename nonconformant identifiers.Nick Mathewson
Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
2012-01-16Convert instances of tor_malloc+tor_snprintf into tor_asprintfNick Mathewson
These were found by looking for tor_snprintf() instances that were preceeded closely by tor_malloc(), though I probably converted some more snprintfs as well. (In every case, make sure that the length variable (if any) is removed, renamed, or lowered, so that anything else that might have assumed a longer buffer doesn't exist.)
2012-01-16Convert instances of tor_snprintf+strdup into tor_asprintfNick Mathewson
These were found by looking for tor_snprintf() instances that were followed closely by tor_strdup(), though I probably converted some other snprintfs as well.
2012-01-16Try to use smartlist_add_asprintf consistentlyNick Mathewson
(To ensure correctness, in every case, make sure that the temporary variable is deleted, renamed, or lowered in scope, so we can't have any bugs related to accidentally relying on the no-longer-filled variable.)
2011-12-07clarify a debug lineRoger Dingledine
2011-11-30Warn user about client ignoring non-preferred IP address for a bridge.Linus Nordberg
2011-11-30Whitespace changes.Linus Nordberg
2011-11-30Make router_get_{prim,alt,pref}_addr_port take tor_addr_port_t *.Linus Nordberg
Rename to *_orport for consistency with node_*.
2011-11-30Take IPv6 into account when rewriting routerinfo for a bridge and maintain ↵Linus Nordberg
ipv6_preferred. Don't touch the string representation in routerinfo_t->address. Also, set or clear the routerinfo_t->ipv6_preferred flag based on the address family of the bridge.
2011-11-30Use preferred address when looking for bridges by routerinfo_t.Linus Nordberg
This should be safe to do for all uses of get_configured_bridge_by_routerinfo().
2011-11-30First chunk of support for bridges on IPv6Linus Nordberg
Comments below focus on changes, see diff for added code. New type tor_addr_port_t holding an IP address and a TCP/UDP port. New flag in routerinfo_t, ipv6_preferred. This should go in the node_t instead but not now. Replace node_get_addr() with - node_get_prim_addr() for primary address, i.e. IPv4 for now - node_get_pref_addr() for preferred address, IPv4 or IPv6. Rename node_get_addr_ipv4h() node_get_prim_addr_ipv4h() for consistency. The primary address will not allways be an IPv4 address. Same for node_get_orport() -> node_get_prim_orport(). Rewrite node_is_a_configured_bridge() to take all OR ports into account. Extend argument list to extend_info_from_node and extend_info_from_router with a flag indicating if we want to use the routers primary address or the preferred address. Use the preferred address in as few situtations as possible for allowing clients to connect to bridges over IPv6.
2011-11-30Add some logging and comments.Linus Nordberg
2011-11-03Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-11-03Fix a memleak when fetching descriptors for bridges in ExcludeNodes.George Kadianakis
2011-10-07Merge remote-tracking branch 'asn2/bug3656'Nick Mathewson
Conflicts: src/common/util.c src/common/util.h src/or/config.h src/or/main.c src/test/test_util.c
2011-09-28Merge branch 'maint-0.2.2'Roger Dingledine
2011-09-28bridges should use create_fast cells for their own circuitsRoger Dingledine
fixes bug 4124, as noticed in bug 4115
2011-09-27if we have enough usable guards, just pick oneRoger Dingledine
we don't need to check whether we don't have enough guards right after concluding that we do have enough. slight efficiency fix suggested by an anonymous fellow on irc.