Commit Graph

1934 Commits

Author SHA1 Message Date
Roger Dingledine
cabb8624e2 bugfix: now that we don't do the client dns thing, our checks
to see if somebody was contradicting his exit policy were wrong.


svn:r3755
2005-03-13 05:53:17 +00:00
Roger Dingledine
01f0b31432 ShutdownWaitLength should be an interval, not a uint
svn:r3753
2005-03-12 20:16:52 +00:00
Roger Dingledine
fe768d1d2a change SHUTDOWN_WAIT_LENGTH from a fixed 30 secs to a config option
svn:r3752
2005-03-12 20:13:38 +00:00
Nick Mathewson
115271f65e Implement the common case of ATTACHSTREAM.
svn:r3751
2005-03-12 04:22:01 +00:00
Nick Mathewson
2b7907ef42 Increment step of a for loop should only happen once.
svn:r3746
2005-03-11 21:42:32 +00:00
Nick Mathewson
777d3dde0c Get address map resetting implemented.
svn:r3745
2005-03-11 21:39:39 +00:00
Nick Mathewson
b17bb918ac Remove unused macro; add a comment on remaining macros.
svn:r3744
2005-03-11 21:38:06 +00:00
Roger Dingledine
5254c4e63a remove duplicate function prototype
svn:r3743
2005-03-11 20:47:23 +00:00
Geoff Goodell
af15c711c9 redefining default exit policy as per or-talk discussion
svn:r3739
2005-03-11 05:07:31 +00:00
Nick Mathewson
99cc6bae0d Fix error codes to work on windows
svn:r3738
2005-03-10 18:48:13 +00:00
Nick Mathewson
6394f77edb Initialize msg_len
svn:r3737
2005-03-10 18:46:11 +00:00
Nick Mathewson
aaf70df3bd Fix signed/unsigned warning
svn:r3736
2005-03-10 18:45:42 +00:00
Nick Mathewson
a308353600 Fix const-ness warning
svn:r3733
2005-03-10 06:15:46 +00:00
Nick Mathewson
c185825585 Finish implementing GETINFO; make it easy to query address maps.
svn:r3732
2005-03-03 06:37:54 +00:00
Nick Mathewson
f90ccf5648 Implement new controller events for changed descriptors and new (not-yet-attached) streams.
svn:r3731
2005-03-02 22:29:58 +00:00
Nick Mathewson
4b5e213a0b Separate reverse-virtual-address-map entries into ipv4 and hostname slots. Otherwise if you ask me to map "some IPv4 address" to foo.onion, I might tell you that I already mapped "bar.virtual" to foo.onion
svn:r3730
2005-03-02 22:01:10 +00:00
Nick Mathewson
5315b61e13 Fix some log messages to refer to correct control type.
svn:r3729
2005-03-02 21:59:36 +00:00
Nick Mathewson
5f8e2c2bc4 Rename unused-address functions to virtual address; this is more accurate. Also, include almost-right implementation of reusing dont-care mappings. (It is still kind of wrong because it does not take type into account.)
svn:r3728
2005-03-02 21:02:11 +00:00
Nick Mathewson
b494c2223d Specify and implement fragmented control messages to allow for (among other things) long GETINFO replies. Otherwise we could hit the 64K barrier on questions like "please dump your client-side DNS cache."
svn:r3726
2005-03-02 20:22:10 +00:00
Nick Mathewson
65230fd39f Implement "Dont-Care" from addresses to MapAddress control message. For safety, refuse to launch connections to unmapped addresses in the dont-care range.
svn:r3725
2005-03-02 19:26:46 +00:00
Nick Mathewson
e14f812a67 Still more code to make sure we send the right number and kind of RELAY END cells
svn:r3723
2005-03-02 03:13:05 +00:00
Nick Mathewson
afe414f070 Revise all calls to connection_edge_end to avoid sending MISC, and to take errno into account where possible.
svn:r3720
2005-03-01 22:42:31 +00:00
Nick Mathewson
4ddf768a4f Forward-port new reasons; clean up code more; add code to convert new reasons to SOCKS5 reply codes; add code to convert errnos to reasons. New code still needs to get invoked.
svn:r3719
2005-03-01 22:16:15 +00:00
Nick Mathewson
83743d64ab Change version parsing logic: a version is "obsolete" if it is not recommended and (1) there is a newer recommended version in the same series, or (2) there are no recommended versions in the same series, but there are some recommended versions in a newer series. A version is "new" if it is newer than any recommended version in the same series.
svn:r3716
2005-03-01 01:44:57 +00:00
Nick Mathewson
b7b05dc1b2 make control interface stream IDs monotonically increasing to prevent possible races
svn:r3715
2005-03-01 01:15:01 +00:00
Nick Mathewson
349ee1abea Clean up rend cache on shutdown
svn:r3714
2005-02-28 22:38:00 +00:00
Roger Dingledine
b961d1c3bd disable the reachability detection stuff in cvs, so people can
run servers from cvs while i'm gone.


svn:r3712
2005-02-28 09:39:12 +00:00
Nick Mathewson
c5091e7134 When copying routerinfo, copy descriptor too to prevent later double-free.
svn:r3711
2005-02-28 03:37:27 +00:00
Nick Mathewson
97bc49bd72 Try a little harder to avoid openssl SSL* double-free reports.
svn:r3710
2005-02-28 02:52:51 +00:00
Roger Dingledine
b3177d509e free some more memory at shutdown
svn:r3707
2005-02-28 01:59:18 +00:00
Roger Dingledine
25ff3a5042 fix bug in control mapaddress
svn:r3705
2005-02-27 23:20:48 +00:00
Roger Dingledine
3cef60a0f7 fix a minor memory leak
svn:r3704
2005-02-27 22:08:01 +00:00
Roger Dingledine
a1f1fa6ab2 Checkpoint in-progress fixes:
Add 'testing' circuit purpose, for reachability testing.
Notice when our IP changes, and reset stats.
Try to pull down a directory via Tor to see if our DirPort is working.
Try to extend a circuit back to us to see if our ORPort is working.
Only publish a descriptor if they're both reachable.

These mostly work, and I'd better get them in before I cause conflicts.


svn:r3703
2005-02-27 09:47:01 +00:00
Nick Mathewson
8efb2a957d Make sure that router_get_by_* can always return "me"
svn:r3702
2005-02-27 07:23:42 +00:00
Nick Mathewson
bbaa3c7792 Implement more control spec functionality
- Mapaddress
- Postdescriptor
- GetInfo on descriptors

Required changes elsewhere:
- Keep the most recent running_routers_t in the routerlist_t. That way we
  can learn about new routers and remember whether we were last told that
  they were up or down.  Also enables more simplifications.
- Keep the signed descriptor inside routerinfo_t.  This makes
  descriptor_entry_t in dirservers.c unneeded.
- Rename AddressMap (the verb) to MapAddress. Keep AddressMap as a noun.
- Check addresses for plausibility before mapping them.


svn:r3696
2005-02-25 20:46:13 +00:00
Nick Mathewson
8396105d84 Implement some of GETINFO control message
svn:r3694
2005-02-25 06:37:07 +00:00
Nick Mathewson
81d2c2d8e5 Stub functions for new control-spec logic.
svn:r3693
2005-02-25 06:16:28 +00:00
Nick Mathewson
26e6eb7539 Check returns from libevent calls better; stop poking at internals of events to see if they are live.
svn:r3691
2005-02-25 05:42:01 +00:00
Roger Dingledine
6329811a88 fix a seg fault from tor_free_all
svn:r3690
2005-02-24 23:01:26 +00:00
Nick Mathewson
24d7ae6fe8 Insert missing ! in assert_connection_ok; test was accidentally reversed in revision 1.329 yesterday. Should fix bug 102
svn:r3685
2005-02-24 17:08:27 +00:00
Roger Dingledine
5b24ca6cde cache .exit address better (i think)
svn:r3684
2005-02-24 11:44:08 +00:00
Roger Dingledine
6faaac2706 add support for CONNECTing through https proxies.
not sure if it works. i don't have an https proxy.


svn:r3682
2005-02-24 10:56:55 +00:00
Roger Dingledine
8054f82992 stop a potential overflow (pointed out by ilja)
svn:r3681
2005-02-24 10:22:00 +00:00
Nick Mathewson
2adee31a26 Improve log message on unrecognized encoding to indicate that we can cope.
svn:r3676
2005-02-23 22:14:34 +00:00
Nick Mathewson
22c38b0f9b Clarify comment. Use CONN_IS_EDGE more. Try to be more zealous about calling connection_edge_end when things go bad with edge conns in connection.c
svn:r3671
2005-02-23 20:35:26 +00:00
Nick Mathewson
69a36e352e clarify comment
svn:r3667
2005-02-23 06:46:54 +00:00
Nick Mathewson
e0387d1322 Addressmap tweak: Make "addressmap x x" remove any mapping from the address x.
svn:r3666
2005-02-23 06:40:48 +00:00
Nick Mathewson
2ff6cfccd6 Forward-port fix to make dual-purpose NT executable work.
svn:r3665
2005-02-23 05:34:25 +00:00
Roger Dingledine
55c3f15ed1 Forward-port the trick to bump up ConnLimit as far as it can
go, but not past MAXCONNECTIONS. Also throw away the FAKE_POLL
caveats since 0.1.0 doesn't need it any more.


svn:r3657
2005-02-22 23:52:44 +00:00
Nick Mathewson
6e6d95b3db Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
2005-02-22 08:18:36 +00:00