summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-01-29Add ClientUseIPv4 and ClientPreferIPv6DirPort torrc optionsteor (Tim Wilson-Brown)
ClientUseIPv4 0 tells tor to avoid IPv4 client connections. ClientPreferIPv6DirPort 1 tells tor to prefer IPv6 directory connections. Refactor policy for IPv4/IPv6 preferences. Fix a bug where node->ipv6_preferred could become stale if ClientPreferIPv6ORPort was changed after the consensus was loaded. Update documentation, existing code, add unit tests.
2016-01-29Fix *_get_all_orports to use ipv6_orportteor (Tim Wilson-Brown)
node_get_all_orports and router_get_all_orports incorrectly used or_port with IPv6 addresses. They now use ipv6_orport. Also refactor and remove duplicated code.
2015-12-16Merge remote-tracking branch 'teor/fix-multi-dir'Nick Mathewson
2015-12-17Prop210: Fix directory fetch teststeor (Tim Wilson-Brown)
Check that directory fetches behave as expected under Prop 210.
2015-12-17Prop210: Check fallback directories and authorities work as expectedteor (Tim Wilson-Brown)
Also clarify comments.
2015-12-17Prop210: Only clients benefit from multiple consensus downloadsteor (Tim Wilson-Brown)
Anything that's a server can afford to wait for a few minutes. (Except for bridge relays, which act like clients.)
2015-12-16More emergency-check code for un-removed pending entry connsNick Mathewson
This might also be what #17752 needs.
2015-12-16Add an edge_about_to_close() call to ap_about_to_close().Nick Mathewson
Fixes #17876
2015-12-16Move pending-connection code into connection_ap_about_to_closeNick Mathewson
It is AP-specific, so that's where it belongs. This shouldn't have caused a bug, but due to #17876, we were never actually calling connection_edge_about_to_close from connection_ap_about_to_close, causing bug #17874 (aka bug #17752).
2015-12-16Merge branch 'maint-0.2.7'Nick Mathewson
2015-12-16Don't call pthread_condattr_setclock() unless it existsNick Mathewson
Fixes bug 17819; bugfix on 0.2.6.3-alpha (specifically, d684dbb0).
2015-12-16Merge branch 'maint-0.2.7'Nick Mathewson
2015-12-16... and fix another backtrace_symbols_fd call in sandbox.cNick Mathewson
2015-12-16... and fix the linux backtrace_symbols{,_fd} callsNick Mathewson
2015-12-16tweak router_parse_addr_policy_item_from_string docsNick Mathewson
2015-12-16Merge remote-tracking branch 'teor/feature17863'Nick Mathewson
2015-12-16Merge remote-tracking branch 'teor/feature17864'Nick Mathewson
2015-12-16More debugging code to try to track down #17659Nick Mathewson
2015-12-16Add some assertions to try to catch #17752Nick Mathewson
2015-12-16... and fix the linux backtrace_symbols{,_fd} callsNick Mathewson
2015-12-16Wait for busy authorities/fallbacks rather than ignoring excluded nodesteor (Tim Wilson-Brown)
Applies the 6c443e987d fix to router_pick_directory_server_impl. 6c443e987d applied to directory servers chosen from the consensus, and was: "Tweak the 9969 fix a little If we have busy nodes and excluded nodes, then don't retry with the excluded ones enabled. Instead, wait for the busy ones to be nonbusy."
2015-12-16Warn when comparing against an AF_UNSPEC address in a policyteor (Tim Wilson-Brown)
It produces unexpected results, and it's most likely a bug.
2015-12-16Add policy assume_action support for IPv6 addressesteor (Tim Wilson-Brown)
These IPv6 addresses must be quoted, because : is the port separator, and "acce" is a valid hex block. Add unit tests for assumed actions in IPv6 policies.
2015-12-16Initialise malformed_list to 0 each time we parse a policyteor (Tim Wilson-Brown)
2015-12-16Limit IPv6 mask bits to 128teor (Tim Wilson-Brown)
2015-12-15Merge remote-tracking branch 'teor/feature15775-fallback-v9-squashed'Nick Mathewson
2015-12-15Fix some memory leaks in the unit testsNick Mathewson
2015-12-16Add Fallback Directory Candidate Selection Scriptteor
"Tor has included a feature to fetch the initial consensus from nodes other than the authorities for a while now. We just haven't shipped a list of alternate locations for clients to go to yet. Reasons why we might want to ship tor with a list of additional places where clients can find the consensus is that it makes authority reachability and BW less important. We want them to have been around and using their current key, address, and port for a while now (120 days), and have been running, a guard, and a v2 directory mirror for most of that time." Features: * whitelist and blacklist for an opt-in/opt-out trial. * excludes BadExits, tor versions that aren't recommended, and low consensus weight directory mirrors. * reduces the weighting of Exits to avoid overloading them. * places limits on the weight of any one fallback. * includes an IPv6 address and orport for each FallbackDir, as implemented in #17327. (Tor won't bootstrap using IPv6 fallbacks until #17840 is merged.) * generated output includes timestamps & Onionoo URL for traceability. * unit test ensures that we successfully load all included default fallback directories. Closes ticket #15775. Patch by "teor". OnionOO script by "weasel", "teor", "gsathya", and "karsten".
2015-12-15clean whitespaceNick Mathewson
2015-12-15Merge remote-tracking branch 'teor/feature17327-v4'Nick Mathewson
2015-12-15remove redundant section in tor.1.txtNick Mathewson
2015-12-15Merge branch 'feature8195_small_squashed'Nick Mathewson
2015-12-15Update KeepCapabilities based on comments from asnNick Mathewson
* The option is now KeepBindCapabilities * We now warn if the user specifically asked for KeepBindCapabilities and we can't deliver. * The unit tests are willing to start. * Fewer unused-variable warnings. * More documentation, fewer misspellings.
2015-12-15Add unit tests for switch_id(), including tests for capabilitiesNick Mathewson
2015-12-15Add ability to keep the CAP_NET_BIND_SERVICE capability on LinuxNick Mathewson
This feature allows us to bind low ports when starting as root and switching UIDs. Based on code by David Goulet. Implement feature 8195
2015-12-15Fix a few compilation warnings and errorsNick Mathewson
2015-12-15Merge remote-tracking branch 'teor/feature4483-v10-squashed'Nick Mathewson
2015-12-16Prop210: Add router_digest_is_fallback_dirteor (Tim Wilson-Brown)
router_digest_is_fallback_dir returns 1 if the digest is in the currently loaded list of fallback directories, and 0 otherwise. This function is for future use.
2015-12-16Prop210: Close excess connections once a consensus is downloadingteor (Tim Wilson-Brown)
Once tor is downloading a usable consensus, any other connection attempts are not needed. Choose a connection to keep, favouring: * fallback directories over authorities, * connections initiated earlier over later connections Close all other connections downloading a consensus.
2015-12-16Prop210: Add schedules for simultaneous client consensus downloadsteor (Tim Wilson-Brown)
Prop210: Add attempt-based connection schedules Existing tor schedules increment the schedule position on failure, then retry the connection after the scheduled time. To make multiple simultaneous connections, we need to increment the schedule position when making each attempt, then retry a (potentially simultaneous) connection after the scheduled time. (Also change find_dl_schedule_and_len to find_dl_schedule, as it no longer takes or returns len.) Prop210: Add multiple simultaneous consensus downloads for clients Make connections on TestingClientBootstrapConsensus*DownloadSchedule, incrementing the schedule each time the client attempts to connect. Check if the number of downloads is less than TestingClientBootstrapConsensusMaxInProgressTries before trying any more connections.
2015-12-15Merge branch 'feature17576-UseDefaultFallbackDirs-v2-squashed'Nick Mathewson
2015-12-15Add UseDefaultFallbackDirs for hard-coded directory mirrorsteor (Tim Wilson-Brown)
UseDefaultFallbackDirs enables any hard-coded fallback directory mirrors. Default is 1, set it to 0 to disable fallbacks. Implements ticket 17576. Patch by "teor".
2015-12-16Prop210: Add want_authority to directory_get_from_dirserverteor (Tim Wilson-Brown)
2015-12-16Prop210: Refactor connection_get_* to produce lists and countsteor (Tim Wilson-Brown)
2015-12-15Merge branch 'maint-0.2.7'Nick Mathewson
2015-12-15Fix backtrace compilation on FreeBSDcypherpunks
On FreeBSD backtrace(3) uses size_t instead of int (as glibc does). This causes integer precision loss errors when we used int to store its results. The issue is fixed by using size_t to store the results of backtrace(3). The manual page of glibc does not mention that backtrace(3) returns negative values. Therefore, no unsigned integer wrapping occurs when its result is stored in an unsigned data type.
2015-12-15Add changes file for 17804cypherpunks
2015-12-15Remove the INLINE coding standardcypherpunks
2015-12-15Remove eventdns specific inline definitioncypherpunks
The header includes compat.h which already defines inline.
2015-12-15Remove obsolete INLINE preprocessor definitioncypherpunks
The INLINE keyword is not used anymore in favor of inline. Windows only supports __inline so an inline preprocessor definition is still needed.