Commit Graph

437 Commits

Author SHA1 Message Date
Nick Mathewson
2d7cf75e42 r9298@dhcp-18-188-67-85: nickm | 2006-10-20 11:25:07 -0400
Weasel correctly notes that we should not discard the return value from connection_exit_begin_con.  Right now, the return value is always discardable, so this does not actually cause a bug, but it might later. So fix it.


svn:r8774
2006-10-20 15:26:02 +00:00
Nick Mathewson
136ed33071 r9289@31-35-219: nickm | 2006-10-20 09:43:22 -0400
Fix longstanding bug in connection_exit_begin_conn():  Since connection_edge_end() exits when the connection is unattached, we were never sending RELAY_END cells back for failed RELAY_BEGIN attempts. Fix this.  This might make clients that were otherwise timing out either fail faster or retry faster, which is good news for us.


svn:r8770
2006-10-20 14:57:46 +00:00
Roger Dingledine
86263acf95 Security bugfixes:
When the user sends a NEWNYM signal, clear the client-side DNS
  cache too. Otherwise we continue to act on previous information.


svn:r8679
2006-10-09 21:11:50 +00:00
Nick Mathewson
c6f2d725d0 r8957@totoro: nickm | 2006-10-08 22:35:17 -0400
The otherwise regrettable MIPSpro C compiler warns about values set but never used, and about mixing enums and ints; these are good warnings, and so should be fixed.  This removes some dead code and some potential bugs. Thanks to pnx.


svn:r8664
2006-10-09 02:35:51 +00:00
Roger Dingledine
9fb98b269c finish poking and prodding. i'm all happy now.
svn:r8633
2006-10-07 09:13:30 +00:00
Roger Dingledine
06e5b2283c minor cleanups
svn:r8622
2006-10-07 00:50:39 +00:00
Roger Dingledine
64b5fd3194 checkpoint some cleanups
svn:r8599
2006-10-05 08:23:21 +00:00
Nick Mathewson
eb0f51f2a3 r8839@totoro: nickm | 2006-10-02 15:31:49 -0400
Make a field longer to accomodate verbose nicknames; note that verbose nicknames will never reach this point.


svn:r8583
2006-10-03 18:58:47 +00:00
Nick Mathewson
ce72a9914e r8822@totoro: nickm | 2006-10-01 16:24:22 -0400
Fix bug 303: reject attempts to use Tor as a one-hop proxy.


svn:r8566
2006-10-01 20:50:11 +00:00
Roger Dingledine
4096e577c5 if we fail to build a circuit to an intended enclave, and it's
not mandatory that we use that enclave, stop wanting it.


svn:r8559
2006-10-01 06:41:13 +00:00
Nick Mathewson
7d366f61cb r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400
Differentiate more duplicated log entries


svn:r8542
2006-09-29 22:33:40 +00:00
Nick Mathewson
9dbfb91f17 r8997@Kushana: nickm | 2006-09-28 23:40:22 -0400
[Needs review.] Add a BEGIN_DIR relay cell type for an easier
 in-protocol way to connect to directory servers through Tor.
 Previously, clients could only connect to director servers over Tor
 from exit nodes, but couldn't get directory information anonymously
 from a non-exit cache without getting a directory server involved.
 
 This needs testing, and needs client-side code to actually exercise it.
 


svn:r8527
2006-09-29 03:50:11 +00:00
Nick Mathewson
d3af1f2189 Backport candidate: Fix a long-standing server-side DNS bug. When a
client asks us to resolve (not connect to) an address, and we have a
cached answer, give them the cached answer.  Previously, we would give
them no answer at all.



svn:r8478
2006-09-24 17:05:00 +00:00
Nick Mathewson
6b3f6afb58 r8895@Kushana: nickm | 2006-09-21 20:05:11 -0400
Debug client-side reverse dns code.


svn:r8452
2006-09-22 00:44:07 +00:00
Nick Mathewson
213658f117 r8894@Kushana: nickm | 2006-09-21 18:30:42 -0400
Specify and implement SOCKS5 interface for reverse hostname lookup.


svn:r8451
2006-09-22 00:43:55 +00:00
Roger Dingledine
9bc8d69dfc remove some loud log messages
svn:r8450
2006-09-22 00:24:27 +00:00
Nick Mathewson
6a1746f98f r8877@Kushana: nickm | 2006-09-21 17:12:33 -0400
Consider non-exit servers unsuitable for RESOLVE commands.


svn:r8442
2006-09-21 21:48:42 +00:00
Nick Mathewson
fd36eb0788 r8576@Kushana: nickm | 2006-08-25 17:16:01 -0400
Fix bug 314: Instead of checking address_in_virtualrange, check addressmap_have_mapping().  This should be more accurate.  [Rename to addressmap_have_mapping() from addressmap_already_mapped().]


svn:r8226
2006-08-25 21:16:22 +00:00
Roger Dingledine
bf10d8a06a simplify compare_cached_resolves_by_expiry() to make it match
the idioms of other compare functions. hopefully i didn't
break it?


svn:r7048
2006-08-14 07:08:29 +00:00
Roger Dingledine
2c27cfc38e save 3-7 bytes per edge connection
svn:r7044
2006-08-14 05:53:57 +00:00
Nick Mathewson
7ddd9e8cd9 r7304@Kushana: nickm | 2006-08-10 01:58:05 -0700
Fix verbose compilation errors; make sure transparent proxy fails when no method is configured.


svn:r7012
2006-08-10 09:02:26 +00:00
Nick Mathewson
3da737ac98 r7303@Kushana: nickm | 2006-08-10 01:52:19 -0700
whitespace fixes


svn:r7011
2006-08-10 09:02:12 +00:00
Nick Mathewson
cd560d8528 r7301@Kushana: nickm | 2006-08-10 01:41:27 -0700
Only open /dev/pf once.


svn:r7009
2006-08-10 09:01:54 +00:00
Nick Mathewson
d893d8c52e r7300@Kushana: nickm | 2006-08-10 01:36:40 -0700
Distinguish netfilter vs pf at configure time based on headers, not on OS.


svn:r7008
2006-08-10 09:01:46 +00:00
Nick Mathewson
5cff4164a0 r7299@Kushana: nickm | 2006-08-10 01:08:58 -0700
Patch from Tup to add support for transparent AP connections: this basically bundles the functionality of trans-proxy-tor into the tor mainline.  Now hosts with compliant pf/netfilter implementations can redirect TCP connections straight to Tor without diverting through SOCKS.


svn:r7007
2006-08-10 09:01:37 +00:00
Roger Dingledine
2bcb081cb1 defense in depth
svn:r6939
2006-07-30 04:32:58 +00:00
Nick Mathewson
5227395aba r6922@Kushana: nickm | 2006-07-26 16:32:24 -0400
Rename some fields, compress a bitfield, and document some structs and fields


svn:r6919
2006-07-27 05:03:57 +00:00
Nick Mathewson
ec82db6995 r6909@Kushana: nickm | 2006-07-26 13:05:58 -0400
Clean up wide lines from last patch.


svn:r6907
2006-07-26 19:07:37 +00:00
Nick Mathewson
4ff4577beb r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400
Refactor connection_t into edge, or, dir, control, and base subtypes.  This might save some RAM on busy exit servers, but really matters most in terms of correctness.


svn:r6906
2006-07-26 19:07:26 +00:00
Nick Mathewson
a88ec48a39 r6902@Kushana: nickm | 2006-07-25 17:30:27 -0400
Move rend_query to origin_circuit_t where it belongs; save another 17 bytes per OR circuit.


svn:r6903
2006-07-26 19:05:34 +00:00
Nick Mathewson
7239262f71 Don't tell anybody, but we're going OO here. This patch splits
circuit_t into origin_circuit_t and or_circuit_t.  I fixed some
segaults; there may be more.  We still need to move more rendezvous
stuff into subtypes.

This is a trial run for splitting up connection_t; if the approach is
insane, please say so soon so we can do something smarter.

Also, this discards the old HALF_OPEN code, which nobody seems to
want.


svn:r6817
2006-07-23 07:37:35 +00:00
Roger Dingledine
db657ea0af don't squeal if the first few retries fail.
svn:r6791
2006-07-18 04:48:59 +00:00
Roger Dingledine
892f671f59 Define a schedule for how long to wait between retrying
application connections. Rather than waiting a fixed amount of
time between each retry, we wait only 5 seconds for the first,
10 seconds for the second, and 15 seconds for each retry after
that. Hopefully this will improve the expected experience.

Addresses bug 297.


svn:r6790
2006-07-18 04:42:32 +00:00
Roger Dingledine
388ac4126a If we are using an exit enclave and we can't connect, e.g. because
its webserver is misconfigured to not listen on localhost, then back
off and try connecting from somewhere else before we fail.


svn:r6783
2006-07-18 00:59:46 +00:00
Roger Dingledine
3d79eb52ab stick to nick's nul/null convention
svn:r6763
2006-07-15 19:21:30 +00:00
Roger Dingledine
fad85f173a when an exit node gets a malformed begin cell, don't complain to
the node operator, since he can't do anything about it.


svn:r6733
2006-07-06 02:44:07 +00:00
Roger Dingledine
5c57348acd We got an obscure report of an assert error on a windows Tor server with
connection_add being called with socket = -1. The only places I can see
where that happen would be if our tor_socketpair succeeds but it hands
back negative values for some of its file descriptors. Perhaps this will
produce more useful assert errors next time.


svn:r6550
2006-06-06 00:06:52 +00:00
Nick Mathewson
2700e5a1ab Oops. When we dont get a TTL, we should default to the default, not to the minimum.
svn:r6527
2006-06-03 21:47:26 +00:00
Nick Mathewson
c660a0f6a2 More DNS fixes. Send meaningful TTLs back to the client when
possible.  Cache at the server side independently from the TTL, to
prevent attackers from probing the server to see who has been asking
for what hostnames.  (Hi, Dan Kaminski!)

Also, clean some whitespace.


svn:r6526
2006-06-03 21:41:14 +00:00
Roger Dingledine
6b058bd563 add a few more debugging lines to help mikec track down his
11 minute jump into the future.


svn:r6465
2006-05-23 03:08:30 +00:00
Roger Dingledine
5721747de2 class B really means /16 here
svn:r6404
2006-04-18 05:03:09 +00:00
Nick Mathewson
735a2131b8 require at least 2**16 assignable virtual addresses
svn:r6402
2006-04-18 04:57:07 +00:00
Nick Mathewson
7484ca06a5 [Forward-port ]Test and document last patch.
svn:r6400
2006-04-18 03:51:18 +00:00
Nick Mathewson
0df40a393b [forward-port] Implement an option, VirtualAddrMask, to set which addresses get handed out in response to mapaddress requests. Needs testing and docs!
svn:r6398
2006-04-18 03:36:28 +00:00
Roger Dingledine
21263982e4 Don't yell loudly about failed internal/bridge connections. These
are reachability testing and rendserv upload/downloads, and they
have their own failure messages elsewhere.


svn:r6343
2006-04-09 21:36:37 +00:00
Roger Dingledine
6f08d121d9 Refactor and consolidate addr/exit policies into a new policies.c.
Fix some minor bugs and memory leaks along the way.


svn:r6246
2006-03-27 02:25:34 +00:00
Roger Dingledine
28fafb9022 new config option SocksTimeout: How long do we let a socks connection
wait unattached before we fail it?

Use this value for controller socks timeout, for normal socks
timeout, and for hidden-service socks timeout.


svn:r6217
2006-03-21 23:27:43 +00:00
Roger Dingledine
d1d0813cf3 Allow non-printable characters for exit streams (both for
connecting and for resolving). Now we tolerate applications
that don't follow the RFCs. But continue to block malformed
names at the socks side.


svn:r6193
2006-03-19 03:55:48 +00:00
Roger Dingledine
726e825b09 i'm a little teapot, short and stout
svn:r6192
2006-03-19 01:59:02 +00:00
Roger Dingledine
7e2aa67fcb simplify when we're picking a default address for
when people ask for "serifos.exit".


svn:r6187
2006-03-18 22:54:08 +00:00