aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.h
Commit message (Collapse)AuthorAge
* Use channel_t rather than or_connection_t for circuitsAndrea Shepard2012-10-08
|
* pass the reason from the truncated cell to the controllerRoger Dingledine2012-10-03
| | | | | | | (rather than just always declaring that the reason is END_CIRC_REASON_OR_CONN_CLOSED) resolves bug 7039.
* Merge remote-tracking branch 'asn/bug6788'Nick Mathewson2012-09-07
|\
| * Remove redundant declaration of find_transport_name_by_bridge_addrport().George Kadianakis2012-09-07
| |
* | Rename extend_info_alloc() --> _new()Nick Mathewson2012-09-06
|/ | | | | Based on a patch from Linus, regenerated so as to not conflict with Linus's 5535/6363 patches.
* Tweak code and pump the tor-fw-helper version.George Kadianakis2012-09-05
| | | | | Conflicts: src/or/circuitbuild.h
* Move ipv6_preferred from routerinfo_t to node_t.Linus Nordberg2012-08-23
| | | | | | | | | | | | | | | | | | | | Move extend_info_from_router() from circuitbuild.c to router.c and make it static. Add get_configured_bridge_by_orports_digest() and have get_configured_bridge_by_routerinfo() and node_is_a_configured_bridge() use it. We now consider all OR ports of a bridge when looking for it. Move node_get_*_orport to nodelist.c. Fix a cut'n'paste error in header of nodelist.h. Add node_assert_ok(). Add router_get_all_orports(). It's duplicating code from node_get_all_orports(). Worth fixing at the cost of complicating the API slightly?
* Avoid double-typedef of transport_t.Nick Mathewson2012-07-19
| | | | | | | You can say "struct foo_t" as much as you want, but you'd better not have "typedef struct foo_t foo_t" more than once. Fix for bug 6416. Bug not in any released version of Tor.
* Address Nick's comments.George Kadianakis2012-07-12
| | | | | | | | - Add a changes/ file. - Make it compile under --enable-gcc-warnings. - Update the file-level documentation of src/or/transports.c. - Only update descriptor if at least a managed proxy was configured. - Add our external IP address to the extra-info descriptor instead of 0.0.0.0.
* Move transport-related functions from circuitbuild.c to transports.c.George Kadianakis2012-07-03
| | | | | Move 'transport_t' to transports.h, and all transport-related functions that don't rely on 'bridge_list' to transports.c.
* Merge remote-tracking branch 'asn-mytor/bug5589_take2'Nick Mathewson2012-06-14
|\
| * Remove validate_pluggable_transports_config(): redundant since 9d9b5ed0.George Kadianakis2012-06-14
| | | | | | | | | | | | 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.
* | Move cbt->liveness.timeouts_after_firsthop free code into its own functionAndrea Shepard2012-06-13
|/
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Add about 60 more DOCDOC comments to 0.2.3Nick Mathewson2012-06-04
| | | | | | | | 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.
* Use a more helpful log message when we can't find a proxy.George Kadianakis2012-05-18
|
* Allow 0.2.3.x clients to use 0.2.2.x bridges.Roger Dingledine2012-01-25
| | | | | | | | | | | | | | | | | | | | | | 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.
* Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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;
* First chunk of support for bridges on IPv6Linus Nordberg2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge remote-tracking branch 'asn2/bug3656'Nick Mathewson2011-10-07
|\ | | | | | | | | | | | | | | | | Conflicts: src/common/util.c src/common/util.h src/or/config.h src/or/main.c src/test/test_util.c
| * Don't warn of stray Bridges if managed proxies are still unconfigured.George Kadianakis2011-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With managed proxies you would always get the error message: "You have a Bridge line using the X pluggable transport, but there doesn't seem to be a corresponding ClientTransportPlugin line." because the check happened directly after parse_client_transport_line() when managed proxies were not fully configured and their transports were not registered. The fix is to move the validation to run_scheduled_events() and make sure that all managed proxies are configured first.
| * Prepare circuitbuild.[ch] and config.[ch] for SIGHUPs.George Kadianakis2011-09-11
| | | | | | | | | | | | * Create mark/sweep functions for transports. * Create a transport_resolve_conflicts() function that tries to resolve conflicts when registering transports.
| * Put some last missing pieces together.George Kadianakis2011-07-13
| | | | | | | | | | | | | | | | * Add some utility transport functions in circuitbuild.[ch] so that we can use them from pt.c. * Make the accounting system consider traffic coming from proxies. * Make sure that we only fetch bridge descriptors when all the transports are configured.
* | Merge remote-tracking branch 'public/bug2841'Nick Mathewson2011-07-11
|\| | | | | | | | | Conflicts: src/or/config.c
| * Style and grammar tweaks on 2841 branchNick Mathewson2011-07-02
| |
| * Small tweaks to 2841 codeNick Mathewson2011-07-02
| | | | | | | | | | | | | | - const-ify some transport_t pointers - Remove a vestigial argument to parse_bridge_line - Make it compile without warnings on my laptop with --enable-gcc-warnings
| * Revised how we handle ClientTransportPlugin and Bridge lines.George Kadianakis2011-06-22
| | | | | | | | | | | | | | | | Multiple Bridge lines can point to the same one ClientTransportPlugin line, and we can have multiple ClientTransportPlugin lines in our configuration file that don't match with a bridge. We also issue a warning when we have a Bridge line with a pluggable transport but we can't match it to a ClientTransportPlugin line.
| * Fixes on circuitbuild.[ch] based on nick's comments.George Kadianakis2011-06-21
| | | | | | | | | | | | | | | | | | * Renamed transport_info_t to transport_t. * Introduced transport_get_by_name(). * Killed match_bridges_with_transports(). We currently *don't* detect whether any bridges miss their transports, of if any transports miss their bridges. * Various code and aesthetic tweaks and English language changes.
| * Fixes small bugs.George Kadianakis2011-06-14
| |
| * Various trivial changes.George Kadianakis2011-06-12
| | | | | | | | | | | | | | | | * Improved function documentation. * Renamed find_bridge_transport_by_addrport() to find_transport_by_bridge_addrport(). * Sanitized log severities we use. * Ran check-spaces.
| * We can now connect using transports as well!George Kadianakis2011-06-12
| |
| * We can now match our transports with our bridges.George Kadianakis2011-06-11
| |
* | Make the get_options() return constNick Mathewson2011-06-14
|/ | | | | | | | This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output!
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-02
|\ | | | | | | | | | | | | | | This merge was a bit nontrivial, since I had to write a new node_is_a_configured_bridge to parallel router_is_a_configured_bridge. Conflicts: src/or/circuitbuild.c
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-15
|\| | | | | | | | | Conflicts: src/or/circuitbuild.h
| * Preserve bridge download status across SETCONF, HUPNick Mathewson2011-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code changes it so that we don't remove bridges immediately when we start re-parsing our configuration. Instead, we mark them all, and remove all the marked ones after re-parsing our bridge lines. As we add a bridge, we see if it's already in the list. If so, we just unmark it. This new behavior will lose the property we used to have that bridges were in bridge_list in the same order in which they appeared in the torrc. I took a quick look through the code, and I'm pretty sure we didn't actually depend on that anywhere. This is for bug 3019; it's a fix on 0.2.0.3-alpha.
* | Merge branch 'maint-0.2.2'Roger Dingledine2011-01-15
|\|
| * Sanity-check consensus param valuesSebastian Hahn2011-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to make sure that the worst thing that a weird consensus param can do to us is to break our Tor (and only if the other Tors are reliably broken in the same way) so that the majority of directory authorities can't pull any attacks that are worse than the DoS that they can trigger by simply shutting down. One of these worse things was the cbtnummodes parameter, which could lead to heap corruption on some systems if the value was sufficiently large. This commit fixes this particular issue and also introduces sanity checking for all consensus parameters.
* | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\|
| * Bump copyright statements to 2011 (0.2.2)Nick Mathewson2011-01-03
| |
* | Merge branch 'maint-0.2.2'Roger Dingledine2010-12-19
|\|
| * Merge remote branch fix_security_bug_021 into fix_security_bug_022Nick Mathewson2010-12-15
| | | | | | | | | | | | | | Conflicts: src/common/memarea.c src/or/or.h src/or/rendclient.c
* | Initial conversion to use node_t throughout our codebase.Nick Mathewson2010-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A node_t is an abstraction over routerstatus_t, routerinfo_t, and microdesc_t. It should try to present a consistent interface to all of them. There should be a node_t for a server whenever there is * A routerinfo_t for it in the routerlist * A routerstatus_t in the current_consensus. (note that a microdesc_t alone isn't enough to make a node_t exist, since microdescriptors aren't usable on their own.) There are three ways to get a node_t right now: looking it up by ID, looking it up by nickname, and iterating over the whole list of microdescriptors. All (or nearly all) functions that are supposed to return "a router" -- especially those used in building connections and circuits -- should return a node_t, not a routerinfo_t or a routerstatus_t. A node_t should hold all the *mutable* flags about a node. This patch moves the is_foo flags from routerinfo_t into node_t. The flags in routerstatus_t remain, but they get set from the consensus and should not change. Some other highlights of this patch are: * Looking up routerinfo and routerstatus by nickname is now unified and based on the "look up a node by nickname" function. This tries to look only at the values from current consensus, and not get confused by the routerinfo_t->is_named flag, which could get set for other weird reasons. This changes the behavior of how authorities (when acting as clients) deal with nodes that have been listed by nickname. * I tried not to artificially increase the size of the diff here by moving functions around. As a result, some functions that now operate on nodes are now in the wrong file -- they should get moved to nodelist.c once this refactoring settles down. This moving should happen as part of a patch that moves functions AND NOTHING ELSE. * Some old code is now left around inside #if 0/1 blocks, and should get removed once I've verified that I don't want it sitting around to see how we used to do things. There are still some unimplemented functions: these are flagged with "UNIMPLEMENTED_NODELIST()." I'll work on filling in the implementation here, piece by piece. I wish this patch could have been smaller, but there did not seem to be any piece of it that was independent from the rest. Moving flags forces many functions that once returned routerinfo_t * to return node_t *, which forces their friends to change, and so on.
* | Try to make most routerinfo_t interfaces constNick Mathewson2010-10-01
|/
* Merge branch 'bug1772' into maint-0.2.2Roger Dingledine2010-09-29
|\
| * refactor and recomment; no actual changesRoger Dingledine2010-09-29
| |
* | Merge commit 'mikeperry/bug1740' into maint-0.2.2Roger Dingledine2010-09-29
|\|
| * Only count timeout data for 3 hop circuits.Mike Perry2010-09-29
| | | | | | | | | | Use 4/3 of this timeout value for 4 hop circuits, and use half of it for canabalized circuits.
* | optimistically retry EntryNodes on socks requestRoger Dingledine2010-09-28
| | | | | | | | | | We used to mark all our known bridges up when they're all down and we get a new socks request. Now do that when we've set EntryNodes too.
* | refactor; no actual changesRoger Dingledine2010-09-28
|/