summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
AgeCommit message (Collapse)Author
2016-09-13Merge branch 'feature-17178-v7-squashed-v2'Nick Mathewson
2016-09-13Make Tor2web work with ReachableAddresses and CRN_DIRECT_CONNteor
The changes in #19973 fixed ReachableAddresses being applied too broadly, but they also broke Tor2web (somewhat unintentional) compatibility with ReachableAddresses. This patch restores that functionality, which makes intro and rend point selection is consistent between Tor2web and Single Onion Services.
2016-09-13Implement Prop #260: Single Onion Servicesteor (Tim Wilson-Brown)
Add experimental OnionServiceSingleHopMode and OnionServiceNonAnonymousMode options. When both are set to 1, every hidden service on a tor instance becomes a non-anonymous Single Onion Service. Single Onions make one-hop (direct) connections to their introduction and renzedvous points. One-hop circuits make Single Onion servers easily locatable, but clients remain location-anonymous. This is compatible with the existing hidden service implementation, and works on the current tor network without any changes to older relays or clients. Implements proposal #260, completes ticket #17178. Patch by teor & asn. squash! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement Prop #260: Single Onion Services Redesign single onion service poisoning. When in OnionServiceSingleHopMode, each hidden service key is poisoned (marked as non-anonymous) on creation by creating a poison file in the hidden service directory. Existing keys are considered non-anonymous if this file exists, and anonymous if it does not. Tor refuses to launch in OnionServiceSingleHopMode if any existing keys are anonymous. Similarly, it refuses to launch in anonymous client mode if any existing keys are non-anonymous. Rewrite the unit tests to match and be more comprehensive. Adds a bonus unit test for rend_service_load_all_keys().
2016-09-05Appease make check-spacesAndrea Shepard
2016-08-31Fix a deref-before-null-check complaintNick Mathewson
Found by coverity scan; this is CID 1372329. Also, reindent some oddly indented code.
2016-08-29Merge remote-tracking branch 'teor/reject-tap-v6'Nick Mathewson
2016-08-24Merge branch 'maint-0.2.8'Nick Mathewson
2016-08-24Fix path selection on firewalled clientsteor
Signed-off-by: teor <teor2345@gmail.com>
2016-08-24Client & HS ignore UseNTorHandshake, all non-HS handshakes use ntorteor (Tim Wilson-Brown)
Rely on onion_populate_cpath to check that we're only using TAP for the rare hidden service cases. Check and log if handshakes only support TAP when they should support ntor.
2016-08-24Client & HS make sure every hop in every non-HS path supports ntorteor (Tim Wilson-Brown)
When a client connects to an intro point not in the client's consensus, or a hidden service connects to a rend point not in the hidden service's consensus, we are stuck with using TAP, because there is no ntor link specifier.
2016-07-28Three more -Wshadow fixes.Nick Mathewson
2016-07-28Fix a huge pile of -Wshadow warnings.Nick Mathewson
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
2016-07-15Clients avoid choosing nodes that can't do ntorteor (Tim Wilson-Brown)
If we know a node's version, and it can't do ntor, consider it not running. If we have a node's descriptor, and it doesn't have a valid ntor key, consider it not running. Refactor these checks so they're consistent between authorities and clients.
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-05-27Merge remote-tracking branch 'arma/task19035-fixedup'Nick Mathewson
2016-05-27Disable GET /tor/bytes.txt and GETINFO dir-usageRoger Dingledine
Remove support for "GET /tor/bytes.txt" DirPort request, and "GETINFO dir-usage" controller request, which were only available via a compile-time option in Tor anyway. Feature was added in 0.2.2.1-alpha. Resolves ticket 19035.
2016-05-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-16touchups and refactorings on bug 18616 branchRoger Dingledine
no behavior changes
2016-04-25Remove redundant declarations of MINNick Mathewson
Apparently somewhere along the line we decided that MIN might be missing. But we already defined it (if it was missing) in compat.h, which everybody includes. Closes ticket 18889.
2016-03-24Always allow OR connections to bridges on private addressesteor (Tim Wilson-Brown)
Regardless of the setting of ExtendAllowPrivateAddresses. This fixes a bug with pluggable transports that ignore the (potentially private) address in their bridge line. Fixes bug 18517; bugfix on 23b088907f in tor-0.2.8.1-alpha.
2016-03-15Fix whitespace.Nick Mathewson
2016-03-11Merge remote-tracking branch 'teor/bug8976_01_028'Nick Mathewson
2016-03-04Reject multicast rendezvous point addressesteor (Tim Wilson-Brown)
Unless ExtendAllowPrivateAddresses is 1.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-27Make sure that every module in src/or has a brief description.Nick Mathewson
2016-01-29Return NULL from extend_info_from_node if the node has no allowed addressteor (Tim Wilson-Brown)
Modify callers to correctly handle these new NULL returns: * fix assert in onion_extend_cpath * warn and discard circuit in circuit_get_open_circ_or_launch * warn, discard circuit, and tell controller in handle_control_extendcircuit
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.
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-12-08Don't allow a rendezvous point to have a private addressDavid Goulet
When an HS process an INTRODUCE2 cell, we didn't validate if the IP address of the rendezvous point was a local address. If it's the case, we end up wasting resources by trying to extend to a local address which fails since we do not allow that in circuit_extend(). This commit now rejects a rendezvous point that has a local address once seen at the hidden service side unless ExtendAllowPrivateAddresses is set. Fixes #8976 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-11-25Refuse to make direct connections to private OR addressesteor (Tim Wilson-Brown)
Refuse connection requests to private OR addresses unless ExtendAllowPrivateAddresses is set. Previously, tor would connect, then refuse to send any cells to a private address. Fixes bugs 17674 and 8976; bugfix on b7c172c9ec76 (28 Aug 2012) Original bug 6710, released in 0.2.3.21-rc and an 0.2.2 maint release. Patch by "teor".
2015-04-22Reachability should check ExtendAllowPrivateAddresses not TestingTorNetworkteor
When self-testing reachability, use ExtendAllowPrivateAddresses to determine if local/private addresses imply reachability. The previous fix used TestingTorNetwork, which implies ExtendAllowPrivateAddresses, but this excluded rare configs where ExtendAllowPrivateAddresses is set but TestingTorNetwork is not. Fixes bug 15771; bugfix on 0.2.6.1-alpha, bug #13924. Patch by "teor", issue discovered by CJ Ess.
2015-04-16Merge remote-tracking branch 'arma/ticket8766'Nick Mathewson
2015-02-23Avoid logging natural-language reports that are redundant with bootstrappingNick Mathewson
2015-02-11Merge branch 'bug12844'Nick Mathewson
Conflicts: src/or/circuituse.c src/test/include.am src/test/test_entrynodes.c
2015-02-11Additional paranoia: do not even build tor2web stuff if not using.Nick Mathewson
(That is, don't build it unless we're building for tor2web, or we are building for tests.)
2015-02-09Recover better when our clock jumps back many hoursRoger Dingledine
like might happen for Tails or Whonix users who start with a very wrong hardware clock, use Tor to discover a more accurate time, and then fix their clock. Resolves part of ticket 8766. (There are still some timers in various places that aren't addressed yet.)
2015-02-02Merge remote-tracking branch 'public/bug9635_warnings_025'Nick Mathewson
Conflicts: src/test/test.c
2015-02-02tweak based on comments from dgouletNick Mathewson
2015-01-21fix a commentNick Mathewson
2015-01-07When closing circs build through a new guard, only close local onesNick Mathewson
If we decide not to use a new guard because we want to retry older guards, only close the locally-originating circuits passing through that guard. Previously we would close all the circuits. Fixes bug 9819; bugfix on 0.2.1.1-alpha. Reported by "skruffy".
2015-01-07appease "make check-spaces"Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-30Fix Reachability self-tests in test networksteor
Stop assuming that private addresses are local when checking reachability in a TestingTorNetwork. Instead, when testing, assume all OR connections are remote. (This is necessary due to many test scenarios running all nodes on localhost.) This assists in bootstrapping a testing Tor network. Fixes bugs 13718 & 13924.
2014-12-30Avoid excluding guards from path building in minimal test networksteor
choose_good_entry_server() now excludes current entry guards and their families, unless we're in a test network, and excluding guards would exclude all nodes. This typically occurs in incredibly small tor networks, and those using TestingAuthVoteGuard * This is an incomplete fix, but is no worse than the previous behaviour, and only applies to minimal, testing tor networks (so it's no less secure). Discovered as part of #13718.
2014-12-26Fix log messages in channeltls.cteor
Add hop number in debug "Contemplating intermediate hop..." Fix capitalisation on warn "Failed to choose an exit server"
2014-12-21Merge branch 'ticket7356_squashed'Nick Mathewson
2014-12-21Using CHANNEL_IS_OPEN macro in circuitbuild.crl1987
2014-11-27Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'Nick Mathewson
Conflicts: src/or/or.h src/test/Makefile.nmake