Commit Graph

2157 Commits

Author SHA1 Message Date
Nick Mathewson
0f49fd3bcd Fix leakable rsa key
svn:r3099
2004-12-07 06:48:02 +00:00
Roger Dingledine
e0e40e51ae clean up docs a bit for default log lines.
svn:r3098
2004-12-07 06:38:41 +00:00
Roger Dingledine
2ff38fdf83 when recommending new-format log lines, if the upper bound is LOG_ERR,
leave it implicit.


svn:r3097
2004-12-07 06:27:39 +00:00
Nick Mathewson
d19648b314 Renormalize whitespace
svn:r3095
2004-12-07 05:33:55 +00:00
Nick Mathewson
ac759adb43 Make unit tests work on win32
svn:r3094
2004-12-07 05:31:38 +00:00
Nick Mathewson
08e3090aff More win32 fixes: 1) tolerate extra "readable" events better. 2) when being multithreaded, leave parent fdarray open.
svn:r3092
2004-12-06 23:19:55 +00:00
Nick Mathewson
249a36586f Fix parse_iso_time on platforms without strptime.
svn:r3091
2004-12-06 22:39:10 +00:00
Roger Dingledine
4006246b9e bump us to 0.0.9rc6
svn:r3089
2004-12-06 06:27:39 +00:00
Roger Dingledine
f00631e6b9 answer resolved ip in network order
svn:r3087
2004-12-06 06:14:45 +00:00
Roger Dingledine
f10f24a61c avoid using uninitialized variable
svn:r3086
2004-12-06 06:07:57 +00:00
Roger Dingledine
0859d09352 don't use cache for resolving .foo.exit names, but do reply immediately
if we're asked to resolve an IP.foo.exit.


svn:r3085
2004-12-06 06:06:13 +00:00
Roger Dingledine
577665f608 fix indenting
svn:r3084
2004-12-06 05:26:19 +00:00
Roger Dingledine
f21564eb29 send an end to the streams we close when we hibernate, rather
than just chopping them off


svn:r3083
2004-12-05 13:02:18 +00:00
Roger Dingledine
1c9c813866 check if we have a cached resolve for a tor-resolve address *after*
we remove the .foo.exit part of the address.


svn:r3082
2004-12-05 12:47:46 +00:00
Roger Dingledine
5ba3328172 fix a minor leak in my recent commit
svn:r3081
2004-12-05 12:35:00 +00:00
Roger Dingledine
469135e7e2 talk about quotas rather than bandwidths, in the logs
svn:r3080
2004-12-05 12:26:02 +00:00
Roger Dingledine
50a314c931 int is not necessarily the same size as size_t
svn:r3079
2004-12-05 11:58:30 +00:00
Roger Dingledine
ef6c9d18e7 New circuit building strategy: keep a list of ports that we've used in the past 6 hours, and always try to have 2 circuits open or on the way
that will handle each such port. (We can extend this to include addresses
if exit policies shift to require that.) Seed us with port 80 so web
browsers won't complain that Tor is "slow to start up".

This was necessary because our old circuit building strategy just involved
counting circuits, and as time went by we would build up a big pile of
circuits that had peculiar exit policies (e.g. only exit to 9001-9100)
which would take up space in the circuit pile but never get used.

Fix router_compare_addr_to_addr_policy: it was not treating a port of *
as always matching, so we were picking reject *:* nodes as exit nodes too.

If you haven't used a clean circuit in an hour, throw it away, just to
be on the safe side.

This means after 6 hours a totally unused Tor client will have no
circuits open.


svn:r3078
2004-12-05 07:10:08 +00:00
Roger Dingledine
32e74d3525 fix comment
svn:r3077
2004-12-04 13:58:34 +00:00
Roger Dingledine
02b3229a04 plus add a comment re: the previous bug
svn:r3076
2004-12-04 10:18:41 +00:00
Roger Dingledine
52676364b9 bugfix: router_exit_policy_rejects_all() was broken, so we were
sometimes picking middleman nodes as our last hop, which wasn't
very useful.


svn:r3075
2004-12-04 08:56:59 +00:00
Roger Dingledine
2532e9405e Now we allow writing to the buffer even when the stream if marked for
close, if we're planning to wait to flush it.

This is important because we were sending a socks reject back if we're
closing and hadn't already sent one, but it wasn't actually getting
written since the conn was already marked-for-close.


svn:r3074
2004-12-04 07:13:37 +00:00
Roger Dingledine
5a6e117caf React to eof immediately on non-open edge connections.
Stop keeping track of num_retries for apconns, since they expire
after 60 seconds anyway.

When warning about retrying or giving up, print the address, so
the user knows which one it's talking about.


svn:r3073
2004-12-04 03:26:35 +00:00
Roger Dingledine
c644886c38 bugfix: When we were checking to see if an ap_conn should time out
waiting for its connected cell, we were calculating time from when the
ap_conn was created. So if it waited say 20 seconds before being attached,
then we would immediately decide that the circuit had timed out.

Also, make circuit_dump_by_conn() display actual circuit progress,
including circuits that haven't been attached to the conn yet but
hope to when it finishes connecting.


svn:r3072
2004-12-04 02:51:11 +00:00
Roger Dingledine
675f60aa13 whoops
just because it says snprintf doesn't mean it's a noop


svn:r3071
2004-12-04 01:23:04 +00:00
Nick Mathewson
fc87758ff3 Add function to check that addr_policy_t is okay; change struct addr_policy_t to addr_policy_t.
svn:r3070
2004-12-04 01:14:36 +00:00
Roger Dingledine
e694268644 bump us to 0.0.9rc6-cvs
darn these bugs


svn:r3069
2004-12-04 00:36:34 +00:00
Roger Dingledine
8d69dc472b make circuit building and router parsing less noisy
svn:r3068
2004-12-04 00:25:54 +00:00
Roger Dingledine
f79a7d8d62 while hibernating, hup should not regrow our listeners.
svn:r3067
2004-12-03 23:53:35 +00:00
Nick Mathewson
a980446d0c Be more proactive about noticing underflows: size_t values greater than 0x800...00 are likely to be trouble.
svn:r3064
2004-12-02 04:33:01 +00:00
Roger Dingledine
db5e100cde clean up 3 more underflow possibilities
svn:r3063
2004-12-02 04:31:52 +00:00
Roger Dingledine
0799804c60 fix redundant (and dangerous) NUL termination
svn:r3062
2004-12-02 04:16:18 +00:00
Nick Mathewson
e3f6f92cf7 check for duplicate circuit ID _after_ updating circ_id_type.
svn:r3058
2004-12-01 04:55:03 +00:00
Roger Dingledine
a3395e893f bump to 0.0.9rc5
svn:r3056
2004-12-01 04:32:51 +00:00
Roger Dingledine
82f3ebf195 move StatusFetchPeriod to 15 minutes so it's within bounds by default
svn:r3055
2004-12-01 04:27:11 +00:00
Roger Dingledine
ef04cfcbad one more typo
svn:r3054
2004-12-01 04:13:15 +00:00
Nick Mathewson
41ba4575b3 Fix windows build.
svn:r3053
2004-12-01 03:51:59 +00:00
Nick Mathewson
b457cfb5eb Spell-check strings and comments
svn:r3052
2004-12-01 03:48:14 +00:00
Nick Mathewson
6e88abf418 If we are using select, make sure we stay within FD_SETSIZE.
svn:r3051
2004-12-01 03:15:59 +00:00
Roger Dingledine
bde1d5bfb2 do even less inside our signal handler,
just to be extra paranoidly safe


svn:r3050
2004-12-01 02:54:13 +00:00
Nick Mathewson
a889926e1c Clarify chosen tag progression
svn:r3047
2004-11-30 16:07:20 +00:00
Roger Dingledine
3929f58018 clean obsolete circuit_log_path code
svn:r3046
2004-11-30 10:47:48 +00:00
Roger Dingledine
eb558d0a84 clean up the other "Tell Roger" log that dfc keeps getting
svn:r3042
2004-11-30 09:02:25 +00:00
Roger Dingledine
7a8c1ca1e4 a few minor tweaks
svn:r3041
2004-11-30 08:54:08 +00:00
Roger Dingledine
19ada3f7fa write down our "how to have two defaults for dirfetchperiod"
issue, so we don't forget about it.


svn:r3040
2004-11-30 08:44:19 +00:00
Roger Dingledine
1d4af1930c Let resolve conns retry/expire also, rather than sticking around forever.
Put the check-if-requested-exitrouter-will-reject-us code in the
circuit_attach loop, so it gets checked periodically and not just
once at the beginning. This is useful in case the routerlist changes,
but also in case the address gets resolved into something that we learn
we'll reject.


svn:r3039
2004-11-30 08:39:14 +00:00
Roger Dingledine
d383c23e73 refuse .exit addresses immediately if the requested node would
refuse the request (e.g. due to exit policy or wrong version)


svn:r3038
2004-11-30 08:15:09 +00:00
Nick Mathewson
5ec4e75cdb Make tor-resolve accept x.y.exit addresses again
svn:r3036
2004-11-30 07:06:05 +00:00
Nick Mathewson
bec7a1c6e8 use shorter minimum key lifetime until 008 is dead
svn:r3035
2004-11-30 06:44:07 +00:00
Nick Mathewson
f19e9b8577 doxygen uses backslashes, not forward-slashes
svn:r3033
2004-11-30 06:17:35 +00:00
Nick Mathewson
a3477223de clarify why strlcpy is safe in truncated log messages
svn:r3032
2004-11-30 06:15:06 +00:00
Nick Mathewson
a5d3325c5c Fix last patch
svn:r3031
2004-11-30 06:12:21 +00:00
Nick Mathewson
c8abe1907d Rename parse_address to parse_extended_hostname (since we have other kinds of addresses); make its output an enum; support HEXDIGEST.exit hostnames.
svn:r3029
2004-11-30 03:44:10 +00:00
Nick Mathewson
ebab451eed Make version parsing tests pass
svn:r3028
2004-11-30 03:41:06 +00:00
Nick Mathewson
fd68834b17 Give an early error if you pass a .onion or a .exit hostname to tor-resolve
svn:r3027
2004-11-30 03:12:37 +00:00
Nick Mathewson
ad7db5e43a Add casei versions of strcmpstart/strcmpend
svn:r3026
2004-11-30 03:10:56 +00:00
Nick Mathewson
ee7bef1458 Enforce coding style.
svn:r3025
2004-11-30 02:26:41 +00:00
Nick Mathewson
e764d00e15 If anybody set DirFetchPostPeriod, give them StatuFetchPeriod instead. Impose minima and maxima for all *Period options; impose even tighter maxima for fetching if we are a caching dirserver. Clip rather than rejecting. arma: are these good?
svn:r3024
2004-11-30 02:23:51 +00:00
Nick Mathewson
ce505f5033 note possible alternative for how to do CVS versions; ask arma which he likes.
svn:r3023
2004-11-29 23:06:51 +00:00
Nick Mathewson
6507be4290 Implement new version format for post 0.1.
svn:r3022
2004-11-29 23:04:26 +00:00
Nick Mathewson
7fbd297532 Suggestion from weasel: Make tor --version --version dump the cvs Id of every file.
svn:r3019
2004-11-29 22:25:31 +00:00
Nick Mathewson
aff5122685 Fetch cached running-routers from servers that serve it (that is, authdirservers, and servers running 0.0.9rc5-cvs or later.)
svn:r3018
2004-11-29 21:01:34 +00:00
Nick Mathewson
b6b07d1d98 Remove needless -2 in log code. This was not an underflow risk, sinze we only call format_msg from one place, where buf_len==10024
svn:r3017
2004-11-29 20:39:55 +00:00
Roger Dingledine
671a2de762 clean up the previous underflow check, and also point out
yet another one that may be a problem. nick?


svn:r3016
2004-11-29 08:40:24 +00:00
Roger Dingledine
c1dc17e6e2 put in initial support for ".nickname.exit" addresses, to let alice
decide what exit node to use; based on a patch by geoff goodell.

needs more work: e.g. it goes bananas building new circuits when the
chosen exit node's exit policy rejects the connection.


svn:r3015
2004-11-29 08:34:54 +00:00
Nick Mathewson
9ba7311c1c After implementing a feature, remember to disable the error message you used to get when requesting it.
svn:r3013
2004-11-29 07:59:00 +00:00
Nick Mathewson
eccfe23a21 Disallow NDEBUG. It is very stupid.
svn:r3012
2004-11-29 07:22:57 +00:00
Roger Dingledine
531c060b36 fix integer underflow in tor_vsnprintf()
(probably exploitable)


svn:r3011
2004-11-29 06:49:04 +00:00
Roger Dingledine
185f047450 prevent integer underflow
(not currently exploitable, ilja and i think)


svn:r3010
2004-11-29 06:43:21 +00:00
Roger Dingledine
9811f68310 bump to 0.0.9rc5-cvs
svn:r3009
2004-11-29 01:00:54 +00:00
Roger Dingledine
7fc30fc1e6 accept *:706 (silc) by default
svn:r3006
2004-11-28 15:49:12 +00:00
Roger Dingledine
22727b4edc wrong is ok, and right is fine, but in between is apparently
totally unacceptable to me.


svn:r3005
2004-11-28 11:39:53 +00:00
Nick Mathewson
f7c6ad065e correct multiple internal spaces
svn:r3004
2004-11-28 09:14:07 +00:00
Nick Mathewson
6f5dbefa7e Normalize space: add one between every control keyword and control clause.
svn:r3003
2004-11-28 09:05:49 +00:00
Roger Dingledine
67dc7baa59 bump to 0.0.9rc4
svn:r3001
2004-11-28 06:44:08 +00:00
Roger Dingledine
dad760ddd1 one of the debugging aids was misleading
svn:r3000
2004-11-28 06:33:14 +00:00
Nick Mathewson
32651dd108 connect() on win32 can do more things than we thought?
svn:r2999
2004-11-28 05:58:55 +00:00
Nick Mathewson
0702179d28 Very oops. make windows nonblocking sockets nonblocking
svn:r2998
2004-11-28 05:57:18 +00:00
Nick Mathewson
f77ff938b7 remember; tor_socket_errno has side effects!
svn:r2997
2004-11-28 05:48:02 +00:00
Roger Dingledine
40c97ac504 move the rendezous section of the torrc to the middle, since
it isn't server-only, and indeed it may be unwise to run a
hidden service on a server.


svn:r2995
2004-11-27 08:18:22 +00:00
Roger Dingledine
e5e45fe980 inform him more sanely
svn:r2993
2004-11-26 04:19:03 +00:00
Roger Dingledine
a7f92d7ffe inform the user that you noticed when he sent a USR2
svn:r2992
2004-11-26 04:17:57 +00:00
Roger Dingledine
81dad3e08b that's enough changes to bump to rc4-cvs
svn:r2991
2004-11-26 04:08:07 +00:00
Roger Dingledine
f9a0ab62b7 if you want to handle -USR2, you should catch it too.
svn:r2990
2004-11-26 04:03:19 +00:00
Roger Dingledine
7c9a707900 remove emacs droppings, since nick says he doesn't need them anymore
svn:r2989
2004-11-26 04:00:55 +00:00
Roger Dingledine
02a30a348a give up trying to track down the reason we're calling package_inbuf
with a package window of 0. it's safe to just catch the error cases
there and do the right thing.


svn:r2988
2004-11-26 03:43:54 +00:00
Roger Dingledine
179ad27b34 call set_max_file_descriptors() after we configure logs, so
it doesn't always do loglevel info logs on windows.


svn:r2987
2004-11-26 03:05:55 +00:00
Roger Dingledine
e24057b2bf when warning that a version is too new, don't use the confusing
text "is_obsolete_version():".


svn:r2986
2004-11-25 05:49:13 +00:00
Roger Dingledine
d254aeb09e bump to 0.0.9rc3
svn:r2984
2004-11-25 05:40:06 +00:00
Nick Mathewson
f91152ce6a Clarify a bunch of log messages
svn:r2983
2004-11-25 04:20:10 +00:00
Peter Palfrader
f2a96ce1fe Flush the logfd after we print "Tor opening log file", so we don't see those messages days later
svn:r2980
2004-11-24 08:42:06 +00:00
Roger Dingledine
914d346095 update conn_state_to_string
svn:r2979
2004-11-24 07:58:15 +00:00
Roger Dingledine
a2042a8b1d a little help for dfc to debug his "resolve 800 things at once" test
svn:r2978
2004-11-24 07:51:30 +00:00
Roger Dingledine
c89afb7917 avoid infinite loop in tor-resolve if tor hangs up on it
svn:r2977
2004-11-24 07:45:42 +00:00
Roger Dingledine
83e7043eb8 don't process marked-for-close conns further.
(fix assert trigger -- if we're lucky.)


svn:r2975
2004-11-24 06:41:58 +00:00
Roger Dingledine
7d55f3685e make tor-resolve work, uh, more. this time for sure!
svn:r2974
2004-11-24 06:16:36 +00:00
Roger Dingledine
cca469ec58 make tor-resolve work again
svn:r2973
2004-11-24 06:01:52 +00:00
Roger Dingledine
0eebfe3558 bugfix: let socks do multiple rounds of negotiation again
(which is needed for socks5)


svn:r2970
2004-11-24 04:35:28 +00:00
Roger Dingledine
090c84627c patch to nick's patch
svn:r2969
2004-11-24 03:58:45 +00:00
Nick Mathewson
74f74a06c6 make nt service version match actual version
svn:r2968
2004-11-24 00:55:39 +00:00