Nick Mathewson
4453e3794a
Add a pointer from edge connections to their corresponding circuit (ulp!); add some debugging sanity-checking for cirid_orconn_map stuff
...
svn:r4024
2005-04-06 06:13:49 +00:00
Nick Mathewson
2a0b1025e5
Fix bug in last commit when no circid can be found
...
svn:r4023
2005-04-06 05:45:07 +00:00
Nick Mathewson
b34d9adb59
Fix format warning
...
svn:r4022
2005-04-06 05:44:05 +00:00
Roger Dingledine
94cecc712d
note some features we intend to add.
...
svn:r4021
2005-04-06 05:35:06 +00:00
Nick Mathewson
b7cdcf3462
Hopefully, this will make ORs much faster, and not break them: keep a big splay tree of (circid,orconn)->circuit mappings to make circuit_get_by_circid_conn much faster.
...
svn:r4020
2005-04-06 05:33:32 +00:00
Roger Dingledine
712d05c19a
a bit more data on gene's dns threading bug
...
svn:r4019
2005-04-06 05:32:24 +00:00
Roger Dingledine
5f0a84cbe2
update conn-type-state-strings to handle https states for ORs
...
svn:r4018
2005-04-06 04:55:17 +00:00
Nick Mathewson
3014b03b67
Add missing comma. Oops
...
svn:r4017
2005-04-06 03:20:06 +00:00
Nick Mathewson
88fe4d6292
Handle changed router status correctly when reloading fingerprint file
...
svn:r4016
2005-04-06 01:09:26 +00:00
Nick Mathewson
1b5e2182fa
Log msg spelling fix
...
svn:r4015
2005-04-06 00:53:13 +00:00
Roger Dingledine
f860b490be
When we're connecting to an OR and he's got a different nickname/key
...
than we were expecting, only complain loudly if we're an OP or an
authdirserver. Complaining loudly to OR admins just confuses people.
svn:r4014
2005-04-06 00:50:40 +00:00
Nick Mathewson
ac268a8340
Fix Tor for no-threading compilation: move connection_unregister from _connection_free to connection_free.
...
svn:r4013
2005-04-06 00:46:57 +00:00
Nick Mathewson
374edd356e
Change replacement semantics for directory entries: fix bug 121.
...
svn:r4012
2005-04-06 00:01:35 +00:00
Nick Mathewson
4991290935
Revise control spec and implementation to allow all log messages to be sent to controller with their severities intact.
...
svn:r4010
2005-04-05 22:56:17 +00:00
Nick Mathewson
46be0fa999
Make last fix work on windows too.
...
svn:r4009
2005-04-04 21:53:26 +00:00
Nick Mathewson
0fff263a46
Fix possible bug on threading platforms with running out of fds do to cpuworkers and dnsworkers.
...
svn:r4008
2005-04-04 21:46:08 +00:00
Roger Dingledine
f1edeebf7d
client now retries when streams end early for 'hibernating' or
...
'resource limit' reasons; refactor.
svn:r4004
2005-04-04 03:30:49 +00:00
Roger Dingledine
823b7d4d8b
automatically approve nodes running 0.1.0.2-rc or later
...
svn:r4001
2005-04-03 19:01:47 +00:00
Nick Mathewson
1aedf3daf5
Only warn once per nickname from add_nickname_list_to_smartlist per failure.
...
svn:r3997
2005-04-03 05:53:34 +00:00
Nick Mathewson
11d20d78a0
Adjust maximum skew and age for rendezvous descriptors: adjust code to make skew add to age.
...
svn:r3995
2005-04-03 05:36:23 +00:00
Roger Dingledine
658463a751
clean up the circuit-mark-for-close patch
...
svn:r3994
2005-04-03 05:31:41 +00:00
Roger Dingledine
096879687a
start sending 'truncated' cells back rather than destroy cells,
...
if the circuit closes in front of you.
svn:r3993
2005-04-03 05:25:26 +00:00
Nick Mathewson
0dc02328af
Move most of *_mark_for_close out of macros.
...
svn:r3992
2005-04-03 05:22:33 +00:00
Nick Mathewson
055ee7c323
Give better warnings if connection_close_unattached_ap gets called twice or called on a marked connection; rename it to connection_mark_unattached_ap.
...
svn:r3990
2005-04-02 22:11:24 +00:00
Nick Mathewson
4a90d37229
Better messages when POSTDESCRIPTOR fails
...
svn:r3989
2005-04-02 22:02:13 +00:00
Roger Dingledine
13e211de17
We're printing the host mask wrong in exit policies in server descriptors.
...
I believe this isn't a critical bug tho, since we're still obeying the
exit policy internally.
svn:r3987
2005-04-02 08:55:31 +00:00
Roger Dingledine
8dbdbfb831
improved log error message
...
svn:r3986
2005-04-02 08:30:40 +00:00
Nick Mathewson
0e81265359
update copyright notices.
...
svn:r3982
2005-04-01 20:15:56 +00:00
Nick Mathewson
0d6c9c47b3
Short-term fix: prevent possible segfault in connection_close_unattached_ap
...
svn:r3970
2005-04-01 16:04:45 +00:00
Roger Dingledine
453a822425
when you decide you're reachable, actually publish your descriptor
...
right then.
svn:r3968
2005-04-01 09:28:14 +00:00
Roger Dingledine
1ff62dbd18
require exactly 0.0.9.7 for middle hops of testing circs, for now
...
svn:r3967
2005-04-01 09:23:51 +00:00
Roger Dingledine
e786e5dedb
when building testing circuits, always use middle hops
...
running at least 0.0.9.7
svn:r3966
2005-04-01 08:42:26 +00:00
Roger Dingledine
a28ae7a70c
fix assert: if our dirport isn't reachable yet, don't trick
...
*ourselves* into thinking the dirport is zero. but continue
to tell other people that it is.
svn:r3952
2005-04-01 07:42:32 +00:00
Roger Dingledine
cd25e56ad2
when the or-connect succeeded and the tls handshake succeeded
...
but we didn't like the result, we were closing the connection
without sending any destroys back for the pending circuits. now
send those destroys anyway; i hope this doesn't break too much.
svn:r3951
2005-04-01 07:25:18 +00:00
Nick Mathewson
73f6c1531e
fix typo in earlier libevent mmessage suppress patch
...
svn:r3950
2005-04-01 07:16:52 +00:00
Roger Dingledine
003d9df6b0
authdirservers shouldn't do orport reachability detection,
...
since they're in clique mode, so it will be rare to find a
server not already connected to them.
svn:r3949
2005-04-01 07:09:18 +00:00
Nick Mathewson
410ecfcc71
Add code to suppress spurious libevent log msgs; use it to resolve bug 68.
...
svn:r3948
2005-04-01 07:05:21 +00:00
Roger Dingledine
2ff2db8d2a
fix some log spacing problems
...
svn:r3942
2005-04-01 06:23:21 +00:00
Nick Mathewson
efe9ca659a
Use recent libevent features when possible
...
svn:r3940
2005-04-01 02:37:40 +00:00
Nick Mathewson
e04a82ecaf
Patch: when extending to an unknown router, compare identity to expected identity; not nickname-to-expected identity.
...
svn:r3937
2005-03-31 23:30:13 +00:00
Roger Dingledine
801d5ef1de
spell recommended correctly
...
svn:r3936
2005-03-31 20:52:43 +00:00
Roger Dingledine
1f5c8335e8
still publish your descriptor if orport is reachable but dirport isn't
...
when building testing circs for orport testing, require high-bandwidth
nodes, so fewer circs fail. complain about unreachable orport separately
from unreachable dirport.
svn:r3935
2005-03-31 19:26:33 +00:00
Roger Dingledine
c2a05e1ca9
redo the state descriptors now that we have a controller-wait state
...
svn:r3934
2005-03-31 17:36:24 +00:00
Roger Dingledine
4f5192b280
...and use it to make sure we only conclude reachability if
...
we didn't initiate the conn.
svn:r3932
2005-03-31 07:46:59 +00:00
Nick Mathewson
1bf1f44e74
Fix bug in redirectstream.
...
svn:r3926
2005-03-31 06:06:02 +00:00
Roger Dingledine
5bdab005c9
mark two more bugs. nick, can you take a look?
...
svn:r3920
2005-03-29 05:27:32 +00:00
Roger Dingledine
20a8eda31b
don't check for reachability, and don't whine about it, while we're
...
hibernating.
svn:r3919
2005-03-29 03:48:31 +00:00
Roger Dingledine
7cf33ed495
resolve another 'hasn't sent end yet' bug
...
svn:r3911
2005-03-29 00:35:35 +00:00
Nick Mathewson
1612df7b2c
Fix a couple more places where we use ->new_address without checking that it is there.
...
svn:r3907
2005-03-28 02:03:51 +00:00
Roger Dingledine
0e26973c02
make calls to address_is_in_virtual_range more bullet-proof.
...
might fix the assert failure i just got.
svn:r3906
2005-03-28 01:56:12 +00:00
Nick Mathewson
4246f6f8bc
Clarify that we don't, and why we don't, need to redefine FD_SETSIZE.
...
svn:r3904
2005-03-28 01:07:14 +00:00
Roger Dingledine
96c331e4ed
we seem to have lost our define for FD_SETSIZE on win32 in the change
...
from fakepoll to libevent. be sure to define it *before* we include
winsock.
svn:r3903
2005-03-27 22:52:48 +00:00
Roger Dingledine
9b5432214d
but only do the rapid reachability testing if we're hoping to be a server.
...
svn:r3902
2005-03-27 11:52:15 +00:00
Roger Dingledine
b8fe866a9d
forward-port the fixing of the crash bug.
...
svn:r3900
2005-03-27 07:18:30 +00:00
Roger Dingledine
92acd64da0
if your server hasn't found itself to be reachable, complain every
...
20 minutes, not just once.
svn:r3897
2005-03-27 06:50:36 +00:00
Roger Dingledine
7a79acd9f6
clean up socks reply stuff more.
...
add a few more reasons so we can be more informative.
svn:r3895
2005-03-27 06:37:56 +00:00
Nick Mathewson
ce854906db
Rename ManageConnections to LeaveStreamsUnattached. Apparently, there was a missing "TorShould" that was mistaken for an "IWantTo".
...
svn:r3894
2005-03-27 06:25:33 +00:00
Roger Dingledine
36baf7219d
stop most cases of hanging up on a socks connection without sending
...
the socks reject. audit for remaining ones. also make things more
uniform so we always remember to hold-open-until-flushed, etc.
svn:r3891
2005-03-27 04:55:13 +00:00
Roger Dingledine
4533a46e41
move the assert higher up so the error message makes more sense
...
next time.
svn:r3887
2005-03-26 06:27:51 +00:00
Roger Dingledine
fcfe6d2e8b
fix assert: stop trying to send a socks reply to an *exit*
...
connection when we get an end cell before it's finished opening.
svn:r3886
2005-03-26 06:27:04 +00:00
Roger Dingledine
b8d38dc57b
try harder to establish reachability, in the first 20 minutes
...
of uptime.
svn:r3884
2005-03-26 05:54:50 +00:00
Roger Dingledine
1328383482
make it clearer to the human that his server is testing
...
its reachability. tell him when it succeeds, or when 20
minutes pass and it hasn't succeeded yet.
svn:r3882
2005-03-26 01:43:39 +00:00
Roger Dingledine
570da8a8e8
and fill in another missing socks reply
...
svn:r3877
2005-03-25 11:23:03 +00:00
Roger Dingledine
9b9dbad0b7
fix another case where we need to send a socks reply (reject)
...
back before we close the conn.
svn:r3876
2005-03-25 11:12:14 +00:00
Roger Dingledine
8945df8daa
remove dead code
...
svn:r3875
2005-03-25 10:55:49 +00:00
Roger Dingledine
9685164fe5
don't mark a router down just because your httpsproxy is unreachable
...
svn:r3874
2005-03-25 10:55:06 +00:00
Nick Mathewson
d26bcfab92
Note where connection that hasnt sent end was marked.
...
svn:r3872
2005-03-25 05:54:50 +00:00
Roger Dingledine
bd37c9a3bd
REUSEADDR on normal places means you can rebind to the port
...
right after somebody else has let it go. But REUSEADDR on win32
means to let you bind to the port _even when somebody else
already has it bound_. So, don't do that on Win32.
svn:r3867
2005-03-24 23:20:06 +00:00
Roger Dingledine
4abb54a876
forward-port the circuit_resume_edge_reading_helper fix.
...
svn:r3863
2005-03-24 21:57:45 +00:00
Roger Dingledine
fa3c9d94bc
when you attachstream to a circid of 0, send back an answer
...
svn:r3857
2005-03-24 06:28:21 +00:00
Roger Dingledine
09ef2b7e41
cleanup so connection_ap_handshake_attach_chosen_circuit() always
...
gets open circs.
svn:r3856
2005-03-24 06:18:59 +00:00
Nick Mathewson
13fdf51bc1
Bulletproof connection_ap_handshake_attach_chosen_circuit
...
svn:r3855
2005-03-24 06:05:14 +00:00
Nick Mathewson
8e8915f3ca
Fix SOCKS5 bug: Set replylen to 0 after sending hanshake back
...
svn:r3850
2005-03-24 01:11:28 +00:00
Nick Mathewson
0cfdeb01c8
Debug EXTENDCIRCUIT
...
svn:r3849
2005-03-24 01:08:25 +00:00
Roger Dingledine
0dc91fd9c0
fix an assert -- we're not allowed to write onto a conn after we've
...
connection_unregistered it. there's still more work to be done here,
since we need to make sure to send back the socks-reply as soon as we
know what it will be -- we can't just wait until connection-about-to-close
to deal with it.
svn:r3847
2005-03-23 23:19:18 +00:00
Roger Dingledine
fb8a319ffe
fix an over-eager assert, to make httpsproxy get a little farther
...
svn:r3846
2005-03-23 22:11:59 +00:00
Roger Dingledine
a799dad937
forward-port the commenting out of the assert that glenn fink was
...
triggering. we still don't know why he was triggering it.
svn:r3841
2005-03-23 20:42:37 +00:00
Nick Mathewson
4ee6addf57
Fix bug 44: on HUP, if descriptor building fails (say, because router_get_my_address() fails), use old descriptor and warn.
...
svn:r3839
2005-03-23 20:28:40 +00:00
Nick Mathewson
6e4bccc4ac
Make GETINFO for "network-status" work on non-authdirs
...
svn:r3837
2005-03-23 19:15:10 +00:00
Nick Mathewson
b9016bd18f
Fix several bugs (including some crashes) related to control interface; implement missing desc/name functionality.
...
svn:r3836
2005-03-23 08:40:11 +00:00
Nick Mathewson
0b7a9e2e7b
Be willing to cache directories from up to ROUTER_MAX_AGE seconds into the future, now that we are more tolerant of skew.
...
svn:r3832
2005-03-23 06:39:53 +00:00
Nick Mathewson
631ab5c69b
Add a magic value to cpath_layer_t to make sure that we can tell valid cpaths from freed ones. I audited this once; it could use another audit.
...
svn:r3831
2005-03-23 06:21:48 +00:00
Nick Mathewson
905c16846a
Fix a few more instances of memory not freed on exit (found by weasel).
...
svn:r3830
2005-03-23 06:20:50 +00:00
Nick Mathewson
b7ce4d1d3d
Correct fix for self-to-self addressmap; simplify replace-old-entry logic; add missing case.
...
svn:r3829
2005-03-23 05:32:06 +00:00
Roger Dingledine
22386ecf1e
whoops, fix seg fault i just introduced
...
svn:r3828
2005-03-23 03:02:44 +00:00
Roger Dingledine
7373042a7b
fix assert triggers (bugs 109 and 96), and put in some
...
debugging logs to notice future repeat bugs.
svn:r3826
2005-03-23 02:52:55 +00:00
Roger Dingledine
a523439cbc
maybe resolve an assert trigger i just got:
...
connection_edge.c:643 address_is_in_virtual_range: Assertion addr failed; aborting.
nick, what do you think?
svn:r3825
2005-03-23 00:19:51 +00:00
Roger Dingledine
e28b8aaa40
make httpsproxy more likely to work
...
(don't let OR conns do tls until they've finished connecting and
doing the proxy dance.)
svn:r3824
2005-03-22 23:57:18 +00:00
Roger Dingledine
21b1adefbb
fix a 32bit/64bit sprintf mixup that weasel pointed out
...
svn:r3823
2005-03-22 23:27:29 +00:00
Roger Dingledine
ad5f5ddf7e
remove a duplicate circuit_mark_for_close() when picking
...
a path for the circuit fails.
svn:r3822
2005-03-22 23:20:33 +00:00
Roger Dingledine
6659cd5e8e
options->MaxAdvertisedBandwidth only replaces advertised
...
bandwidthrate, not advertised bandwidthcapacity
svn:r3818
2005-03-22 20:41:28 +00:00
Nick Mathewson
ab1d0049a2
Prevent spurious closes when we put stuff on a conn that has not written for a while.
...
svn:r3816
2005-03-22 20:25:51 +00:00
Roger Dingledine
8a763b5ae3
cleanup and a question
...
svn:r3815
2005-03-22 20:04:00 +00:00
Nick Mathewson
7a0072cc1a
Specify and implement close-stream and close-circuit control messages
...
svn:r3814
2005-03-22 19:36:38 +00:00
Nick Mathewson
ec81f87018
Implement an option to cap bandwidth-to-advertise. Arma: can you improve the manpage entry by explaining why you would want to do this?
...
svn:r3813
2005-03-22 19:01:46 +00:00
Nick Mathewson
2d662bf773
Clear up a couple of pedantic compiler warnings
...
svn:r3812
2005-03-22 18:56:11 +00:00
Nick Mathewson
2d40991427
Report HTTP reasons to directory clients. (Also, fix format on new TODO items)
...
svn:r3811
2005-03-22 18:43:24 +00:00
Roger Dingledine
d6a0e5bcc9
when reporting events about streams, use the "real" address for
...
the stream, including the requested .exit address.
svn:r3810
2005-03-22 10:34:23 +00:00
Roger Dingledine
e07e0a4732
remove obsolete code
...
svn:r3809
2005-03-22 10:34:00 +00:00
Nick Mathewson
c4470cbedf
be more explicit about why we are expiring a conn; improve logic a bit too
...
svn:r3808
2005-03-22 06:21:35 +00:00
Nick Mathewson
f5989afde2
Add opt hibernating; fix bug 78
...
svn:r3807
2005-03-22 06:08:28 +00:00
Roger Dingledine
76a03e8635
handle_control_getinfo() was counting msg_len itself,
...
when that's actually smartlist_join_strings2()'s job.
svn:r3806
2005-03-22 05:41:05 +00:00
Roger Dingledine
ed9524a626
Remove controller getinfo support for "desc/all-ids".
...
Replace it with getinfo "network-status" just like in directories.
This way the controller can learn which servers are running, which
are verified, etc.
svn:r3801
2005-03-22 03:27:51 +00:00
Roger Dingledine
8d1460c858
tell me the address of the guy who's trying to attack my dirserver
...
svn:r3799
2005-03-22 01:18:50 +00:00
Roger Dingledine
f1ba4296c1
clean up and refactor some more
...
svn:r3798
2005-03-22 01:01:15 +00:00
Roger Dingledine
35953edae0
Implement controller's "extendcircuit" directive.
...
Also refactor circuit building so we plan the whole path ahead
of time.
svn:r3797
2005-03-22 00:42:38 +00:00
Roger Dingledine
4a497e5030
if our clock jumps forward by 100 seconds or more, assume something
...
has gone wrong with our network and abandon all not-yet-used circs.
svn:r3792
2005-03-19 23:58:42 +00:00
Roger Dingledine
856ab90ca8
stop logging at -l notice every single time a create cell successfully
...
gets processed
svn:r3791
2005-03-19 23:04:15 +00:00
Roger Dingledine
fbeaeb138e
and forward-port the missing space
...
svn:r3789
2005-03-19 20:30:23 +00:00
Nick Mathewson
b88c4ba11c
Turn addr_policy_compare from a tristate to a quadstate; this should help address our "Ah, you allow 1.2.3.4:80. You are a good choice for google.com" problem.
...
svn:r3786
2005-03-19 06:57:16 +00:00
Nick Mathewson
07a7b6af64
Implement redirectstream in control interface.
...
svn:r3785
2005-03-19 06:05:55 +00:00
Roger Dingledine
963ddf2953
fix typo
...
svn:r3784
2005-03-19 05:09:13 +00:00
Nick Mathewson
11aa682812
Split version info into separate spec doc.
...
svn:r3783
2005-03-19 05:07:19 +00:00
Roger Dingledine
ec7f232b24
make hidden services more likely to work from the server-side
...
svn:r3781
2005-03-19 04:38:59 +00:00
Nick Mathewson
b004eda10c
Enable NT service code by default
...
svn:r3780
2005-03-19 01:04:05 +00:00
Nick Mathewson
df9c8feac7
Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
...
svn:r3769
2005-03-17 12:38:37 +00:00
Roger Dingledine
229761465c
re-enable reachability testing stuff.
...
also, consider your ORPort reachable after you've processed a
create cell from any non-local address.
svn:r3763
2005-03-15 01:44:46 +00:00
Roger Dingledine
316afb6d09
fix an assert trigger in cvs: if a resolve request fails, and the circuit
...
has vanished in the meantime, then we would both mark it for close
(i.e. put it on the closeable list) and also immediately free it.
svn:r3759
2005-03-14 04:42:52 +00:00
Nick Mathewson
0197b47ce9
Fix some more obscure compiler warnings
...
svn:r3758
2005-03-14 03:28:46 +00:00
Nick Mathewson
97dad670ea
Renormalize whitespace
...
svn:r3757
2005-03-14 03:18:35 +00:00
Nick Mathewson
fd150459b3
Raise common code for "detach this stream and try it with a different circuit" into a separate function; make that function handle controller-managed streams right.
...
svn:r3756
2005-03-14 03:12:59 +00:00
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
Nick Mathewson
70c3580f81
Patch to localtime/gmtime handling: use the _r variants where available. Use mutexes to fake _r where necessary. Make mutexes no-ops where no threading is enabled.
...
svn:r3653
2005-02-22 07:03:03 +00:00
Nick Mathewson
d01718841e
Remove assumptions that maximum path length is anything like 1024. From comments by Chris Palmer
...
svn:r3652
2005-02-22 06:38:39 +00:00
Nick Mathewson
a68fcbf807
Initial IRIX compatibility fixes: check for inttypes.h; check for platform cell_t.
...
svn:r3648
2005-02-22 04:26:45 +00:00
Nick Mathewson
c2d5b67dd2
After we successfully connect, try handling pending stuff immediately, rather than waiting for the next call to connection_handle_write. Roger: is this right?
...
svn:r3647
2005-02-22 03:02:33 +00:00
Nick Mathewson
e673536e3f
Print uname on start of unittests.
...
svn:r3646
2005-02-22 03:01:31 +00:00
Nick Mathewson
1a55422006
Fix windows build: juggle }s and #endifs around in main.c
...
svn:r3645
2005-02-22 02:57:43 +00:00
Roger Dingledine
8991af604c
make the addressmap internals less noisy
...
svn:r3643
2005-02-22 00:55:50 +00:00
Roger Dingledine
8727acf2f1
Add a new AddressMap directive to rewrite incoming socks addresses.
...
Add a new TrackHostExits directive to trigger addressmaps for
certain incoming socks addresses, for sites that break when your exit
keeps changing.
Redo the client-side dns cache so it's just an addressmap too.
svn:r3641
2005-02-22 00:53:08 +00:00
Roger Dingledine
38f53cff41
forward-port the onion queue thing
...
svn:r3639
2005-02-20 09:27:48 +00:00
Roger Dingledine
cbb4803ec8
forward-port some fixes
...
svn:r3631
2005-02-17 01:12:50 +00:00
Roger Dingledine
797419a62c
remove unused code
...
svn:r3629
2005-02-16 02:06:54 +00:00
Nick Mathewson
0289144229
Fix another crash bug found by Jaroslaw--it is possible for dns_resolve to mark a connection to be freed, if the circuit it was attached to fails for some reason.
...
svn:r3623
2005-02-14 21:16:27 +00:00
Nick Mathewson
427e246a10
Add a missing prototype to or.h
...
svn:r3621
2005-02-13 22:31:26 +00:00
Nick Mathewson
d90ab823ea
remove redundant unpack in critical path
...
svn:r3620
2005-02-13 16:17:32 +00:00
Nick Mathewson
58540dde50
Do not try to double-aquire lock when rotating keys. May fix deadlock bug found by weasel.
...
svn:r3616
2005-02-11 07:56:10 +00:00
Nick Mathewson
5d836c8140
Free tls resources on exit too
...
svn:r3615
2005-02-11 01:41:19 +00:00
Nick Mathewson
f672577bc6
Free even more things on shutdown. Temporarily move tor_free_all out from #ifdef so it gets tested more.
...
svn:r3614
2005-02-11 01:26:47 +00:00
Nick Mathewson
60f234f42b
Add more functions to free things to help dmalloc allong.
...
svn:r3613
2005-02-10 23:18:39 +00:00
Roger Dingledine
33569e40d7
if we're hibernating and we get a sigint, exit immediately.
...
closes bug 91.
svn:r3611
2005-02-10 07:34:19 +00:00
Roger Dingledine
236aa86ae7
stop picking unverified dir mirrors, ever.
...
it only leads to misery.
svn:r3610
2005-02-10 07:00:23 +00:00
Roger Dingledine
37ca621301
when a client asks us for a dir mirror and we don't have one,
...
launch an attempt to get a fresh one.
svn:r3609
2005-02-10 06:31:34 +00:00
Roger Dingledine
07a3307460
remove redundant lines
...
svn:r3607
2005-02-09 23:54:30 +00:00
Nick Mathewson
89d422914a
Patch from adam langley: always remove sockets from libevent before closing them. Should fix epoll-related bugs.
...
svn:r3606
2005-02-09 23:16:31 +00:00
Roger Dingledine
c5c46d6fb6
don't list version in the win32 service display name or service name,
...
since they'll keep changing and people will get messed up about which
one is installed.
svn:r3592
2005-02-09 02:26:24 +00:00
Nick Mathewson
a64b03a4fd
Avoid double-free on tor-resolve failure
...
svn:r3567
2005-02-05 23:55:21 +00:00
Nick Mathewson
bb32fa86d7
Re-normalize whitespace; make "make check-spaces" happy
...
svn:r3566
2005-02-05 21:42:46 +00:00
Nick Mathewson
24ad6542c9
forward-port NT service patch
...
svn:r3565
2005-02-05 21:40:25 +00:00
Nick Mathewson
322c728e97
Fix tor-resolve implementation to prevent crashes and send resolves when we should.
...
svn:r3561
2005-02-05 21:03:24 +00:00
Roger Dingledine
56d4b99491
forward-port the logic skew and double-free thing
...
svn:r3549
2005-02-04 01:49:58 +00:00
Roger Dingledine
efa9bb5535
fix the latest bug: don't explode when some router declares a
...
bandwidthburst of 500 gigabytes.
this bug seems to have taken down most of the network. oops.
svn:r3523
2005-02-03 22:58:22 +00:00
Roger Dingledine
bcece3d8a7
another minor fix
...
svn:r3511
2005-02-03 07:30:00 +00:00
Peter Palfrader
ddd724ef94
Add --with-dmalloc configure option
...
svn:r3508
2005-02-03 07:25:10 +00:00
Peter Palfrader
dfa3a0220f
Write a function header for Roger so he can fill it with life
...
svn:r3507
2005-02-03 07:23:48 +00:00
Roger Dingledine
f575d29a59
note a bug that wmf just found
...
svn:r3503
2005-02-02 06:28:45 +00:00
Roger Dingledine
c1656f41b4
bugfix: tor-resolve requests were ignoring .exit if there was
...
a working circuit they could use instead.
svn:r3502
2005-02-02 06:26:52 +00:00
Roger Dingledine
0551e3a814
reject more default filesharing ports by default.
...
svn:r3500
2005-02-02 04:15:40 +00:00
Roger Dingledine
976bee4a3f
only check if exit_policy_implicitly_allows if you're a server.
...
also, put a comment next to an interesting undocumented 'feature'.
svn:r3499
2005-02-02 01:59:16 +00:00
Roger Dingledine
0f5a198028
sometimes, a conn on the closeable_lst gets absolutely
...
clobbered. maybe this will help me find out why.
svn:r3498
2005-02-02 00:19:09 +00:00
Roger Dingledine
850c300e46
bump the default rate limit to 1 MB
...
svn:r3494
2005-02-01 13:44:10 +00:00
Roger Dingledine
b90983e44f
reject odd-looking addresses at the client, rather than having
...
the server drop them because they're malformed.
svn:r3493
2005-02-01 12:19:44 +00:00
Roger Dingledine
1447145470
give a bit more load to servers that claim to be able to
...
handle a whole lot.
svn:r3489
2005-02-01 02:56:31 +00:00
Roger Dingledine
1e847aebb1
Go into soft hibernation after 95% of the bandwidth is used,
...
not 99%. This is especially important for daily hibernators who
have a small accounting max. Hopefully it will result in fewer
cut connections when the hard hibernation starts.
svn:r3488
2005-02-01 02:45:28 +00:00
Roger Dingledine
2e97593d25
define TOR_FRAGILE if you want tor to give you a core when
...
something goes wrong. this should only be used by people actively
tracking bugs.
svn:r3487
2005-02-01 00:37:16 +00:00
Roger Dingledine
e7e77d6d8e
fix an edge case in parsing config options (thanks weasel)
...
svn:r3486
2005-02-01 00:05:57 +00:00
Peter Palfrader
d19aaa9a46
Fix arma's fix for my leak
...
svn:r3485
2005-01-31 23:47:25 +00:00
Roger Dingledine
ab8691c343
fix a minor memory leak found by weasel
...
svn:r3484
2005-01-31 20:38:57 +00:00
Roger Dingledine
d232831135
stop a sigpipe.
...
apparently when we get an eof, at least sometimes it *does* mean
you'd better not try writing.
svn:r3481
2005-01-31 08:12:30 +00:00
Roger Dingledine
9856e328c4
stop logging loudly when a client tries an old onion key. it's
...
time to give up on that issue, at least for now.
svn:r3479
2005-01-31 04:03:57 +00:00
Roger Dingledine
a7138f2535
fix another rogue connection_free that was causing us troubles
...
there are no doubt more lurking.
svn:r3478
2005-01-31 03:47:38 +00:00
Roger Dingledine
a0312f3590
don't double-detach a closing exit conn that's waiting for dns resolve
...
svn:r3477
2005-01-31 01:27:49 +00:00
Roger Dingledine
692a57c8e8
but don't spring the trip on worker children, because it turns
...
out they don't actually remove anything before freeing the conns.
svn:r3476
2005-01-31 01:02:20 +00:00
Roger Dingledine
d6489d8e41
lay a trap for situations where we connection_free something
...
that's still on one of the lists.
in particular, this will detect situations where we mark-for-close
and then free it ourselves.
svn:r3475
2005-01-31 00:33:32 +00:00
Roger Dingledine
75b45bcd4d
stop the infinite loop of freeing the same connection_t over and
...
over when it's not linked into the connection_array
svn:r3474
2005-01-31 00:26:09 +00:00
Roger Dingledine
5d8659429e
be less noisy about complaining when a jap client tries to connect
...
and we refuse him.
svn:r3472
2005-01-30 23:52:47 +00:00
Roger Dingledine
3969b6066e
Stop crashing when we're asking to close_if_marked a conn that
...
hasn't been connection_added yet. This happens when an exit conn
is in dns_wait and we get a relay end cell for it before it finishes.
We were silently leaking each of these marked conns in 0.0.9.x. Now
we actually free them.
svn:r3470
2005-01-30 21:47:47 +00:00
Roger Dingledine
20ecfc757b
be safe: if you got a resolvefailed end cell but you're not an AP, bail.
...
svn:r3469
2005-01-30 21:46:42 +00:00
Roger Dingledine
7ddeb7fae7
try to find the corrupt closeable_connection_lst entry early
...
svn:r3468
2005-01-30 20:31:08 +00:00
Roger Dingledine
e432d2ceea
we should handle the case where the client has no cert, for
...
backwards compatibility with jap clients.
svn:r3466
2005-01-30 08:02:33 +00:00
Roger Dingledine
cab0138e4c
give a better log message when we don't have a good mirror of
...
the directory yet and somebody asks for it.
svn:r3464
2005-01-30 06:08:42 +00:00
Roger Dingledine
8e7fc8d259
comment about a bug wrt clock skew
...
svn:r3461
2005-01-30 00:07:31 +00:00
Roger Dingledine
d273891107
if we fetch the dir from a mirror that has a wildly skewed
...
clock, then don't bother checking recommended-versions: it will
just make us sad.
as a side effect, people running obsolete versions and whose
clocks are wildly skewed will not be auto-shut-down. but they
will still get warns about their clock skew.
svn:r3459
2005-01-29 11:48:37 +00:00
Roger Dingledine
191e52179c
distinguish between "well-formed and rejected" and "not well
...
formed", when parsing server descriptors.
svn:r3458
2005-01-29 11:23:34 +00:00
Roger Dingledine
7fd8dfe6ea
accept LDAP (389/tcp) and LDAPS (636/tcp) in default exit policy
...
svn:r3457
2005-01-29 11:16:23 +00:00
Roger Dingledine
82d3894f3e
don't let a corrupt directory cache keep us from starting
...
svn:r3456
2005-01-29 11:07:35 +00:00
Roger Dingledine
0b9b97aaf4
forward-port the shutting up
...
svn:r3450
2005-01-28 10:00:29 +00:00
Roger Dingledine
b2fbd834f0
forward-port the dns and maxconn fixes
...
svn:r3448
2005-01-28 08:53:47 +00:00
Nick Mathewson
e03f571ee3
Forward-port win32 service patch; try to clean it a touch.
...
svn:r3438
2005-01-27 21:45:32 +00:00
Nick Mathewson
fbb7f869c5
fwd-port win32 isprint fix
...
svn:r3410
2005-01-22 00:42:58 +00:00
Nick Mathewson
1dc4d9a0ce
Fix dumb bug in unittests.
...
svn:r3409
2005-01-22 00:42:40 +00:00
Nick Mathewson
de9b46ad64
clean a couple of messages
...
svn:r3401
2005-01-21 23:16:07 +00:00
Roger Dingledine
4826718eac
special case so we don't yell when an empty http body doesn't specify a
...
content-encoding
svn:r3397
2005-01-21 03:18:49 +00:00
Roger Dingledine
b137f6d19f
if we get an incredibly skewed timestamp from a dirserver mirror that
...
isn't a verified OR, don't complain very loudly -- it's probably him
that's wrong.
svn:r3395
2005-01-21 00:45:18 +00:00
Nick Mathewson
8115ca5f99
Log the offending policy, not the first policy
...
svn:r3394
2005-01-20 20:42:45 +00:00
Nick Mathewson
6704093c0d
Appease another 64-bit warning
...
svn:r3392
2005-01-20 20:21:34 +00:00
Nick Mathewson
fd41cbcadf
Have reason string for serverdesc post requests contain actual serverdesc status. Also fix return values of dirserv_add_descriptor to work as advertised.
...
svn:r3391
2005-01-20 20:18:32 +00:00
Nick Mathewson
5b45527851
Appease weasel's paranoid 64-bit compiler.
...
svn:r3389
2005-01-20 20:16:48 +00:00
Roger Dingledine
67f0babfd4
start to fix http status stuff, more work needed
...
svn:r3387
2005-01-20 20:07:36 +00:00
Nick Mathewson
80e8359ccf
Give better reason phrases in HTTP status lines. Start resolving task #67 . (Messages still need to be better.)
...
svn:r3386
2005-01-20 19:46:02 +00:00
Nick Mathewson
129e754ae4
Warn when exit policy implicitly allows local addresses.
...
svn:r3383
2005-01-20 18:39:48 +00:00