summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
AgeCommit message (Collapse)Author
2012-10-14Merge remote-tracking branch 'arma/bug7029'Nick Mathewson
2012-10-10Merge branch 'bug7011'Nick Mathewson
Conflicts: src/or/circuitbuild.c The conflict was trivial, since no line of code actually changed in both branches: There was a fmt_addr() that turned into fmt_addrport() in bug7011, and a "if (!n_conn)" that turned into "if (!n_chan)" in master.
2012-10-10Use fmt_addrport where appropriate.David Fifield
This is mostly a conversion from this pattern: log("... %s:%d ...", fmt_and_decorate_addr(&addr), port); to this: log("... %s ...", fmt_addrport(&addr, port)); The output is the same in all cases.
2012-10-10Use fmt_and_decorate_addr in log messages.David Fifield
2012-10-09Split channel_t into channel_t and channel_listener_t; get rid of that big unionAndrea Shepard
2012-10-08Use channel_t rather than or_connection_t for circuitsAndrea Shepard
2012-10-04Merge remote-tracking branch 'linus/bug6757'Nick Mathewson
2012-10-04Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2012-10-03pass the reason from the truncated cell to the controllerRoger Dingledine
(rather than just always declaring that the reason is END_CIRC_REASON_OR_CONN_CLOSED) resolves bug 7039.
2012-10-03properly free the return values of rate_limit_log()Roger Dingledine
resolves bug 7022.
2012-10-03Free some more still-in-use memory at exitRoger Dingledine
2012-09-19Set (and reset) node_t.ipv6_preferred for bridges based on Bridge lines.Linus Nordberg
We used to set it only when ClientPreferIPv6ORPort was set which seems wrong. Fixes one part of #6757.
2012-09-18Bump bug 6866 log messages back up to notice for 0.2.4Nick Mathewson
2012-09-18Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2012-09-18Whitespace fixesNick Mathewson
2012-09-18Print the correct address family in log printout.Linus Nordberg
Look at the address family of the preferred OR port rather than the node.ipv6_preferred flag since the logic has changed with new ClientUseIPv6 config option. Fixes ticket 6884.
2012-09-17Bug 6866: Convert pathbias asserts into log messages.Mike Perry
Asserts were hit by Tor2Web mode.
2012-09-14Split the routerset code out of routerlist.cNick Mathewson
2012-09-13Split the or_state_t portions of config.c into their own fileNick Mathewson
2012-09-13Split the generic config_fmt_t code into a new confparse.c fileNick Mathewson
This helps us split up one of our larger files, and sets the stage for refactoring the configuration backend a little
2012-09-12Fix directory self-testing logicNick Mathewson
When I removed version_supports_begindir, I accidentally removed the mechanism we had been using to make a directory cache self-test its directory port. This caused bug 6815, which caused 6814 (both in 0.2.4.2-alpha). To fix this bug, I'm replacing the "anonymized_connection" argument to directory_initiate_command_* with an enumeration to say how indirectly to connect to a directory server. (I don't want to reinstate the "version_supports_begindir" argument as "begindir_ok" or anything -- these functions already take too many arguments.) For safety, I made sure that passing 0 and 1 for 'indirection' gives the same result as you would have gotten before -- just in case I missed any 0s or 1s.
2012-09-07Remove version_supports checks for versions before 0.2.2.Nick Mathewson
2012-09-06Rename extend_info_alloc() --> _new()Nick Mathewson
Based on a patch from Linus, regenerated so as to not conflict with Linus's 5535/6363 patches.
2012-09-05Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2012-09-05Avoid segfault if EntryGuardPathBias precedes EntryGuardNick Mathewson
Fix for bug 6774; bugfix on 0.2.3.17-beta.
2012-09-04Use preferred OR for nodes with routerstatus and microdesc too.Linus Nordberg
extend_info_from_node() used to use the primary OR port (i.e. IPv4) unless the node had routerinfo. Now that we have IPv6 addresses in microdescs we may want to use them. Note that this patch changes using r->cache_info.identity_digest into using node->identity. I count on these being well synchronised, or things would break in other ways. Right?
2012-09-04Clients connect to public relays over IPv6.Linus Nordberg
Add ClientUseIPv6 and ClientPreferIPv6ORPort configuration options. Use "preferred OR port" for all entry nodes, not only for bridges. Mark bridges with "prefer IPv6 OR port" if an IPv6 address is configured in Bridge line and ClientPreferIPv6ORPort is set. Mark relays with "prefer IPv6 OR port" if an IPv6 address is found in descriptor and ClientPreferIPv6ORPort is set. Filter "preferred OR port" through the ClientUseIPv6 config option. We might want to move this test to where actual connection is being set up once we have a fall back mechanism in place. Have only non-servers pick an IPv6 address for the first hop: We don't want relays to connect over IPv6 yet. (IPv6 has never been used for second or third hops.) Implements ticket 5535.
2012-08-27Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2012-08-27Quiet "Set buildtimeout to low val" warnings: make them infoNick Mathewson
Fix for #6251
2012-08-27Merge remote-tracking branch 'mikeperry/bug6647'Nick Mathewson
2012-08-27Downgrade path-bias warning messages to INFO for now.Nick Mathewson
We've had over two months to fix them, and didn't. Now we need 0.2.3.x stable. Yes, it would be cool to get this working in 0.2.3.x, but not at the expense of delaying every other feature that _does_ work in 0.2.3.x. We can do a real fix in 0.2.4.
2012-08-27Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2012-08-27Disable extending to private/internal addresses by defaultNick Mathewson
This is important, since otherwise an attacker can use timing info to probe the internal network. Also, add an option (ExtendAllowPrivateAddresses) so that TestingTorNetwork won't break. Fix for bug 6710; bugfix on all released versions of Tor.
2012-08-24Clarify docs on get_configured_bridge_by_*_digestNick Mathewson
2012-08-23Bug 6647: Use correct scale constant and prevent rounding errorMike Perry
We were effectively resetting our counts, and the rounding error leads to incorrect log messages.
2012-08-23Bug 6475: Demote pathbias log messages for 0.2.3.xMike Perry
Also make a couple of them less scary. We'll do a separate, additional commit on 0.2.4.x to bump them back up again.
2012-08-23Disable path bias accounting if we have no guards.Mike Perry
This should eliminate a lot of notices for Directory Authorities and other situations where circuits built without using guard nodes.
2012-08-23Move ipv6_preferred from routerinfo_t to node_t.Linus Nordberg
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?
2012-08-17Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2012-08-17Whitespace and build fixes on 6475 patchNick Mathewson
2012-08-16Address Nick's comments from code review.Mike Perry
Also promote log messages to notice and rate-limit them.
2012-08-15Bug 6475: Explicitly track our path bias state.Mike Perry
This is done to avoid spurious warns. Additional log lines are also added to try to track down the codepaths where we are somehow overcounting success counts.
2012-07-18Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2012-07-17Merge remote-tracking branch 'asn/bug3589'Nick Mathewson
2012-07-17Change all SMARTLIST_FOREACH loops of >=10 lines to use BEGIN/ENDNick Mathewson
The SMARTLIST_FOREACH macro is more convenient than BEGIN/END when you have a nice short loop body, but using it for long bodies makes your preprocessor tell the compiler that all the code is on the same line. That causes grief, since compiler warnings and debugger lines will all refer to that one line. So, here's a new style rule: SMARTLIST_FOREACH blocks need to be short.
2012-07-16Refer to the correct variable in a loop when parsing entry guard stateNick Mathewson
Fixes bug 6397 and coverity issue 709599. Bugfix on 0.2.3.17-beta.
2012-07-03Move transport-related functions from circuitbuild.c to transports.c.George Kadianakis
Move 'transport_t' to transports.h, and all transport-related functions that don't rely on 'bridge_list' to transports.c.
2012-06-28fix grammar in commentRoger Dingledine
2012-06-23Catch a few more K&R violations with make check-spacesNick Mathewson
We now catch bare {s that should be on the previous line with a do, while, if, or for, and elses that should share a line with their preceding }. That is, if (foo) { and if (foo) { ... } else are now detected. We should think about maybe making Tor uncrustify-clean some day, but configuring uncrustify is an exercise in bizarreness, and reformatting huge gobs of Tor is always painful.
2012-06-15Triage the XXX023 and XXX022 comments: postpone many.Nick Mathewson