Commit Graph

518 Commits

Author SHA1 Message Date
Roger Dingledine f4ac3f5fdd mark all dirservers up at boot; mark a dirserver down if dir fetch fails
svn:r519
2003-09-30 21:27:16 +00:00
Roger Dingledine 6337927ab8 fix the SSL_read() bug again. this time for sure!
svn:r518
2003-09-30 20:36:20 +00:00
Nick Mathewson decdadd0c5 Check router signatures again; debug signature checking
svn:r517
2003-09-30 20:05:45 +00:00
Nick Mathewson 349919f379 make sure router descriptor doesnt eat the directory-signature
svn:r516
2003-09-30 20:04:40 +00:00
Roger Dingledine 74fad6ebeb make log use a larger buffer, for easier debugging
svn:r515
2003-09-30 19:53:25 +00:00
Nick Mathewson 733ebf0f57 Bugfixes in directory code:
Improve debugging output on fingerprint checking.

Make sure to add our own fingerprint to the fingerprint list _before_
adding our own descriptor, or else we'll reject ourself.

Don't call a directory invalid just because we have a newer descriptor
for some router.

Use router_get_dir_hash to generate hashes for signed directories.

Make sure we add our own descriptor successfully.

Don't fall-through on failed base64-endode.


svn:r514
2003-09-30 19:27:54 +00:00
Nick Mathewson 2593192443 We need to call get_connection_array before using its outputs
svn:r513
2003-09-30 19:25:16 +00:00
Roger Dingledine 638be24d05 move connection_array accessors from main.c to connection.c
(leave poll_array accessors in main.c)


svn:r512
2003-09-30 19:06:22 +00:00
Roger Dingledine fcd7c16937 patch strptime warning -- reduce portability!
svn:r511
2003-09-30 18:47:29 +00:00
Roger Dingledine bc08ecc02e move the tls handshake stuff to connection_or
svn:r510
2003-09-30 18:45:55 +00:00
Roger Dingledine e8862051e2 getting closer to having dirserv working
we now add our own descriptor to the descriptor list
and we rebuild the directory (and dump to disk) after receiving a POST


svn:r509
2003-09-30 08:18:10 +00:00
Roger Dingledine 0b71e22e63 bugfixes and features: closer to making dirserv work
fix a variety of seg faults
don't try to list OPs in running-routers
write cached-directory to disk when rebuilding the dir
on boot, dirservers load approved-routers file
on boot, dirservers load cached directory file


svn:r508
2003-09-29 23:14:49 +00:00
Roger Dingledine 99615a5d9a more cleanup and rearranging
still not finished integrating new dirserv stuff


svn:r507
2003-09-29 07:50:08 +00:00
Roger Dingledine 155ce69068 fix two new segfaults
svn:r506
2003-09-28 08:06:18 +00:00
Roger Dingledine c158056726 expand the scheduler to address SSL_read()'s pending bytes
svn:r505
2003-09-28 06:48:20 +00:00
Roger Dingledine 00bcbfe30e shift read_file_to_str() into util.c
svn:r504
2003-09-28 06:47:29 +00:00
Nick Mathewson 5a3ac9385d Write necessary backends for online directory generation. I think.
svn:r503
2003-09-27 21:30:10 +00:00
Roger Dingledine ac791f2077 clean up receiver buckets; prepare for payloads in relay_end; note a few bugs
svn:r502
2003-09-27 21:09:56 +00:00
Nick Mathewson fd93be2bf4 Add function to wrap SSL_pending
svn:r501
2003-09-27 20:07:40 +00:00
Roger Dingledine 5958d7f404 remove last piece of orkeygen (i think)
svn:r500
2003-09-27 09:01:39 +00:00
Roger Dingledine fa4a259352 remove more pieces of orkeygen
svn:r499
2003-09-27 08:40:47 +00:00
Roger Dingledine 41b2ff6301 clean up connection_assert_ok compiler warnings
svn:r498
2003-09-27 07:33:07 +00:00
Roger Dingledine 9256ed69cb connection_new() can't ever fail
svn:r497
2003-09-27 07:28:44 +00:00
Roger Dingledine f4b1d31dde add Address config element, use it in descriptor
svn:r496
2003-09-27 07:21:36 +00:00
Roger Dingledine 3b2c71e32d orkeygen is obsolete
svn:r495
2003-09-27 05:35:18 +00:00
Roger Dingledine 6f93b491d1 finish enforcing the log convention
svn:r494
2003-09-26 22:27:24 +00:00
Roger Dingledine eadd611ad3 dirservers upload their descs now too
svn:r493
2003-09-26 22:02:02 +00:00
Roger Dingledine e1848a1cc8 make writing descs work
svn:r492
2003-09-26 21:26:25 +00:00
Roger Dingledine d8f676c57b update the cvsignore
svn:r491
2003-09-26 21:16:57 +00:00
Nick Mathewson bc62f010aa Add code to parse fingerprint files and compare routers against fingerprint files.
svn:r490
2003-09-26 20:41:23 +00:00
Nick Mathewson 68121243dd Bugfixes in crypto_pk_write_private_key_to_filename
svn:r489
2003-09-26 18:44:20 +00:00
Nick Mathewson eb1b2597e2 Add published to descriptors
svn:r488
2003-09-26 18:28:32 +00:00
Nick Mathewson 5417029bd5 Refactor common file code into util.c; add published to descriptors
svn:r487
2003-09-26 18:27:35 +00:00
Roger Dingledine 457a1543c0 first pass: obey log convention
ERR is if something fatal just happened

WARNING is something bad happened, but we're still running. The bad thing
is either a bug in the code, an attack or buggy protocol/implementation
of the remote peer, etc. The operator should examine the bad thing and
try to correct it.
(No error or warning messages should be expected. I expect most people
to run on -l warning eventually.)

NOTICE is never ever used.

INFO means something happened (maybe bad, maybe ok), but there's nothing
you need to (or can) do about it.

DEBUG is for everything louder than INFO.


svn:r486
2003-09-26 10:03:50 +00:00
Roger Dingledine 1129cbcf4c update TODO to reflect our progress
svn:r485
2003-09-25 11:05:51 +00:00
Roger Dingledine db8b880837 various bugfixes and updates
redo all the config files for the new format (we'll redo them again soon)

fix (another! yuck) segfault in log_fn when input is too large
tor_tls_context_new() returns -1 for error, not NULL
fix segfault in check_conn_marked() on conn's that die during tls handshake

make ORs also initialize conn from router when we're the receiving node

make non-dirserver ORs upload descriptor to every dirserver on startup
add our local address to the descriptor
add Content-Length field to POST command
revert the Content-Length search in fetch_from_buf_http() to previous code
fix segfault in memmove in fetch_from_buf_http()
raise maximum allowed headers/body size in directory.c


svn:r484
2003-09-25 10:42:07 +00:00
Nick Mathewson d5496333aa Refactor buffers; implement descriptors.
'buf_t' is now an opaque type defined in buffers.c .

Router descriptors now include all keys; routers generate keys as
needed on startup (in a newly defined "data directory"), and generate
their own descriptors.  Descriptors are now self-signed.

Implementation is not complete: descriptors are never published; and
upon receiving a descriptor, the directory doesn't do anything with
it.

At least "routers.or" and orkeygen are now obsolete, BTW.


svn:r483
2003-09-25 05:17:11 +00:00
Roger Dingledine afa7f92abb a few todo things done
svn:r482
2003-09-24 21:30:12 +00:00
Roger Dingledine 055215c038 cleanups, bugfixes, more verbose logs
Fixed up the assert_*_ok funcs some (more work remains)

Changed config so it reads either /etc/torrc or the -f arg, never both

Finally tracked down a nasty bug with our use of tls:
  It turns out that if you ask SSL_read() for no more than n bytes, it
  will read the entire record from the network (and maybe part of the next
  record, I'm not sure), give you n bytes of it, and keep the remaining
  bytes internally. This is fine, except our poll-for-read looks at the
  network, and there are no bytes pending on the network, so we never know
  to ask SSL_read() for more bytes. Currently I've hacked it so if we ask
  for n bytes and it returns n bytes, then it reads again right then. This
  will interact poorly with our rate limiting; we need a cleaner solution.


svn:r481
2003-09-24 21:24:52 +00:00
Roger Dingledine 02f21861cc bugfix: we weren't looking for sys/stat.h
svn:r480
2003-09-23 20:04:28 +00:00
Roger Dingledine 61cf1ce141 integrate assert_connection_ok() checks
svn:r479
2003-09-23 19:47:41 +00:00
Roger Dingledine 917ff439d9 call it tor, not or
svn:r478
2003-09-22 06:22:08 +00:00
Roger Dingledine 67fb743a4d it's safe to do parallel directory fetches/uploads
svn:r477
2003-09-22 06:22:00 +00:00
Roger Dingledine 21fff22175 get network/host order working right again for socks4
svn:r476
2003-09-21 06:44:53 +00:00
Roger Dingledine 095322873c bugfixes and note missing features
deal with content-length headers better when reading http
don't assume struct socks4_info is a packed struct
fail the socks handshake if destip is zero
flesh out conn_state_to_string() for dir conn
fix typo (bug) in connection_handle_read()
directory get is now called fetch, post is now upload
reopen logs on sighup


svn:r475
2003-09-21 06:15:43 +00:00
Roger Dingledine 1a1a4850e1 add a lot of todo entries, from today's meeting
svn:r474
2003-09-20 06:56:15 +00:00
Roger Dingledine 594a45ef9e fix a segfault on truncated log lines
svn:r473
2003-09-19 09:30:34 +00:00
Roger Dingledine 291c669bcd leave the socks handshake on the inbuf until it's complete
this paves the way for supporting socks5 and other handshakes
it also removes those pesky AP-only variables from connection_t

also hacked a fix for a bug where some streams weren't ending properly --
maybe because marked connections weren't flushing properly?


svn:r472
2003-09-18 08:11:31 +00:00
Roger Dingledine 88896dbfe0 add in directory 'post' support
svn:r471
2003-09-17 20:09:06 +00:00
Roger Dingledine ff9e34004f phase out non-tls handshake, now that tls is stable.
svn:r470
2003-09-16 21:20:09 +00:00