aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
Commit message (Collapse)AuthorAge
* Fix OSX compilation.Nick Mathewson2014-04-16
|
* Whitespace, doc fixesNick Mathewson2014-04-16
|
* Educate tor on OpenBSD's use of divert-to rules with the pf firewall.dana koch2014-04-16
| | | | | | | | | | | | | This means that tor can run without needing to communicate with ioctls to the firewall, and therefore doesn't need to run with privileges to open the /dev/pf device node. A new TransProxyType is added for this purpose, "pf-divert"; if the user specifies this TransProxyType in their torrc, then the pf device node is never opened and the connection destination is determined with getsockname (as per pf(4)). The default behaviour (ie., when TransProxyType is "default" when using the pf firewall) is still to assume that pf is configured with rdr-to rules.
* tor_addr_from_sockaddr() is applicable in ipfw code, so use it.Nick Mathewson2014-04-16
|
* ipfw TransPort support on FreeBSD (10267)Nick Mathewson2014-04-16
| | | | | | This isn't on by default; to get it, you need to set "TransProxyType ipfw". (The original patch had automatic detection for whether /dev/pf is present and openable, but that seems marginally fragile.)
* Unit tests for connection_edge_process_resolved_cellNick Mathewson2014-04-02
| | | | Also rename a function to be more accurate (resolve->resolved)
* Look at all of a RESOLVED cell; not just the first answer.Nick Mathewson2014-04-02
| | | | | | | | Also, stop accepting the old kind of RESOLVED cells with no TTL fields; they haven't been sent since 0.1.1.6-alpha. This patch won't work without the fix to #10468 -- it will break DNSPorts unless they set the proper ipv4/6 flags on entry_connection_t.
* Merge remote-tracking branch 'public/bug10987_024'Nick Mathewson2014-02-21
|\
| * Style tweaks on code, changes file for 10987Nick Mathewson2014-02-21
| |
| * Fix: send back correct IPv6 SOCKS5 connect replyDavid Goulet2014-02-21
| | | | | | | | | | | | | | | | | | | | For a client using a SocksPort connection and IPv6, the connect reply from tor daemon did not handle AF_INET6 thus sending back the wrong payload to the client. A changes file is provided and this fixes #10987 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
* | whitespace fixesNick Mathewson2014-01-17
| |
* | Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson2013-12-22
|\|
| * Fix automapping to ipv6Nick Mathewson2013-12-22
| | | | | | | | Bugfix on 0.2.4.7-alpha; fixes bug 10465.
* | Add missing includes for circpathbias.hNick Mathewson2013-10-31
| |
* | Completely refactor how FILENAME_PRIVATE worksNick Mathewson2013-07-10
|/ | | | | | | | | | | | | | | | | | | | We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.
* Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson2013-06-10
|\
| * Fix (Open?)BSD fast-connect bug with optimistic data.Nick Mathewson2013-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's an assertion failure that can occur if a connection has optimistic data waiting, and then the connect() call returns 0 on the first attempt (rather than -1 and EINPROGRESS). That latter behavior from connect() appears to be an (Open?)BSDism when dealing with remote addresses in some cases. (At least, I've only seen it reported with the BSDs under libevent, even when the address was 127.0.0.1. And we've only seen this problem in Tor with OpenBSD.) Fixes bug 9017; bugfix on 0.2.3.1-alpha, which first introduced optimistic data. (Although you could also argue that the commented-out connection_start_writing in 155c9b80 back in 2002 is the real source of the issue.)
* | Fix bug 8846: better log message on IP version confusionNick Mathewson2013-05-17
| |
* | Controller: Add CACHED keyword to ADDRMAP events (#8596 part 2/2)Desoxy2013-04-03
| | | | | | | | | | Add keyword CACHED="YES"/"NO" to ADDRMAP control events to indicate whether the DNS response will be cached or not.
* | Controller: Always send ADDRMAP event after RESOLVE command (#8596 part 1/2)Desoxy2013-04-03
| | | | | | | | | | | | | | | | | | Since 7536c40 only DNS results for real SOCKS requests are added to the cache, but not DNS results for DNSPort queries or control connection RESOLVE queries. Only cache additions would trigger ADDRMAP events on successful resolve. Change it so that DNS results received after a RESOLVE command also generate ADDRMAP events.
* | Bug 8477: Don't warn if fromerly GENERAL circuits still have streams.Mike Perry2013-03-29
| | | | | | | | This can happen in various cases of network failure.
* | Merge remote-tracking branch 'public/bug6174' into maint-0.2.4Nick Mathewson2013-03-18
|\ \
| * | Stop frobbing timestamp_dirty as our sole means to mark circuits unusableNick Mathewson2013-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a number of places, we decrement timestamp_dirty by MaxCircuitDirtiness in order to mark a stream as "unusable for any new connections. This pattern sucks for a few reasons: * It is nonobvious. * It is error-prone: decrementing 0 can be a bad choice indeed. * It really wants to have a function. It can also introduce bugs if the system time jumps backwards, or if MaxCircuitDirtiness is increased. So in this patch, I add an unusable_for_new_conns flag to origin_circuit_t, make it get checked everywhere it should (I looked for things that tested timestamp_dirty), and add a new function to frob it. For now, the new function does still frob timestamp_dirty (after checking for underflow and whatnot), in case I missed any cases that should be checking unusable_for_new_conns. Fixes bug 6174. We first used this pattern in 516ef41ac1fd26f338c, which I think was in 0.0.2pre26 (but it could have been 0.0.2pre27).
* | | Make stream events for RESOLVE lookups more consistentNick Mathewson2013-03-18
| | | | | | | | | | | | Fixes 8203; patch by Desoxy
* | | Fix 8447: use %u to format circid_t.Nick Mathewson2013-03-10
|/ / | | | | | | | | | | | | | | | | Now that circid_t is 4 bytes long, the default integer promotions will leave it alone when sizeof(int) == 4, which will leave us formatting an unsigned as an int. That's technically undefined behavior. Fixes bug 8447 on bfffc1f0fc7616a25c32da2eb759dade4651659e. Bug not in any released Tor.
* | fix a wide lineNick Mathewson2013-02-19
| |
* | Downgrade an assert to LD_BUGNick Mathewson2013-02-19
| | | | | | | | | | This should prevent crashes on further recurrence of 8065, and help diagnose such if they occur
* | Refactor code that rolls back the use stateMike Perry2013-02-01
| | | | | | | | | | | | Also document it better. Mention this refactoring in the comments for the path state machine.
* | Roll back the path_state for circs if we detatch a stream.Mike Perry2013-01-18
| | | | | | | | | | | | | | | | | | | | | | An adversary could let the first stream request succeed (ie the resolve), but then tag and timeout the remainder (via cell dropping), forcing them on new circuits. Rolling back the state will cause us to probe such circuits, which should lead to probe failures in the event of such tagging due to either unrecognized cells coming in while we wait for the probe, or the cipher state getting out of sync in the case of dropped cells.
* | Implement Path use bias accounting.Mike Perry2013-01-18
| | | | | | | | | | | | | | Path use bias measures how often we can actually succeed using the circuits we actually try to use. It is a subset of path bias accounting, but it is computed as a separate statistic because the rate of client circuit use may vary depending on use case.
* | Implement proposal 204: ignore subdomains in hidden service addressesJérémy Bobbio2013-01-16
| | | | | | | | | | | | The implementation is pretty straightforward: parse_extended_hostname() is modified to drop any leading components from an address like 'foo.aaaaaaaaaaaaaaaa.onion'.
* | Aftermath of isin->contains renamingNick Mathewson2013-01-16
| | | | | | | | Fix wide lines and comments, and add a changes file
* | Rename *_isin to *_containsNick Mathewson2013-01-16
| | | | | | | | | | | | | | | | | | | | | | This is an automatically generated commit, from the following perl script, run with the options "-w -i -p". s/smartlist_string_num_isin/smartlist_contains_int_as_string/g; s/smartlist_string_isin((?:_case)?)/smartlist_contains_string$1/g; s/smartlist_digest_isin/smartlist_contains_digest/g; s/smartlist_isin/smartlist_contains/g; s/digestset_isin/digestset_contains/g;
* | Update the copyright date to 201.Nick Mathewson2013-01-16
| |
* | Bug 7691: Send a probe cell down certain types of circs.Mike Perry2013-01-08
| | | | | | | | | | | | | | | | In general, if we tried to use a circ for a stream, but then decided to place that stream on a different circuit, we need to probe the original circuit before deciding it was a "success". We also need to do the same for cannibalized circuits that go unused.
* | Fix a crash bug when running an node without IPv6-exit support.Nick Mathewson2012-12-29
| | | | | | | | Fixes bug 7814; bugfix on 0.2.4.7-alpha.
* | Fix compilation warning: must not format u64 as long.Nick Mathewson2012-12-25
| |
* | Merge remote-tracking branch 'mikeperry/209-path-bias-changes'Nick Mathewson2012-12-25
|\ \
| * | Changes from Nick's code review 'part 1'Mike Perry2012-12-18
| | | | | | | | | | | | I think this is actually his third code review of this branch so far.
| * | Space fixes.Mike Perry2012-12-09
| | |
| * | Allow any valid 'end' cell to mean a circuit was used successfully.Mike Perry2012-12-08
| | | | | | | | | | | | Also improve some log messages.
| * | Refactor path use bias code into own function.Mike Perry2012-12-07
| | | | | | | | | | | | Also, improve and log some failure cases.
| * | Note a strange case for SOCKS streams.Mike Perry2012-12-07
| | |
| * | Prop 209: Add in hidserv path bias counts for usage.Mike Perry2012-12-07
| | |
| * | Prop 209: Add path bias counts for timeouts and other mechanisms.Mike Perry2012-12-07
| | | | | | | | | | | | | | | | | | | | | Turns out there's more than one way to block a tagged circuit. This seems to successfully handle all of the normal exit circuits. Hidden services need additional tweaks, still.
* | | Per-listener option to prefer IPv6 automaps when possible.Nick Mathewson2012-12-17
| | |
* | | Build and test most of the machinery needed for IPv6 virtualaddrmapsNick Mathewson2012-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With an IPv6 virtual address map, we can basically hand out a new IPv6 address for _every_ address we connect to. That'll be cool, and will let us maybe get around prop205 issues. This uses some fancy logic to try to make the code paths in the ipv4 and the ipv6 case as close as possible, and moves to randomly generated addresses so we don't need to maintain those stupid counters that will collide if Tor restarts but apps don't. Also has some XXXX items to fix to make this useful. More design needed.
* | | Refactor the code to check if an address is matched by automapsuffixesNick Mathewson2012-12-17
| | |
* | | Fixed an unused-variable warningNick Mathewson2012-12-17
| | |
* | | Implement option to turn off DNS cache modification by a client portNick Mathewson2012-12-17
| | | | | | | | | | | | | | | (This is part 3 of making DNS cache use enabled/disabled on a per-client port basis. This implements the UseCacheIPv[46]DNS options)