summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-01-29Use fascist firewall and ClientUseIPv4 for bridge clientsteor (Tim Wilson-Brown)
Bridge clients ignore ClientUseIPv6, acting as if it is always 1. This preserves existing behaviour. Make ClientPreferIPv6OR/DirPort auto by default: * Bridge clients prefer IPv6 by default. * Other clients prefer IPv4 by default. This preserves existing behaviour.
2016-01-29Make entry_guard_set_status consistent with entry_is_liveteor (Tim Wilson-Brown)
Check fascist_firewall_allows_node in entry_guard_set_status and return the same message as entry_is_live.
2016-01-29Choose bridge addresses by IPv4/IPv6 preferencesteor (Tim Wilson-Brown)
2016-01-29Log when IPv4/IPv6 restrictions or preferences weren't metteor (Tim Wilson-Brown)
2016-01-29Choose directory servers by IPv4/IPv6 preferencesteor (Tim Wilson-Brown)
Add unit tests, refactor pick_directory functions.
2016-01-29Choose OR Entry Guards using IPv4/IPv6 preferencesteor (Tim Wilson-Brown)
Update unit tests.
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-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