Commit Graph
8845 Commits
Author SHA1 Message Date
Robert Ransom 1eba4f0cc3 Make introduction points expire 2011-10-30 02:17:59 -07:00
Robert Ransom 00885652db Allow intro points to expire somewhat gracefully
The Right Way to expire an intro point is to establish a new one to
replace it, publish a new descriptor that doesn't list any expiring intro
points, and *then*, once our upload attempts for the new descriptor have
ended (whether in success or failure), close the expiring intro points.

Unfortunately, we can't find out when the new descriptor has actually been
uploaded, so we'll have to settle for a five-minute timer.

There should be no significant behaviour changes due to this commit (only
a log-message change or two), despite the rather massive overhaul, so this
commit doesn't include a changes/ file.  (The commit that teaches
intro_point_should_expire_now to return non-zero gets a changes/ file,
though.)
2011-10-30 02:17:10 -07:00
Robert Ransom ae9a831294 Use SMARTLIST_FOREACH_BEGIN and _END, not a for loop 2011-10-30 02:17:07 -07:00
Robert Ransom e46d56a9b4 Correct bogus comments
The behaviour of rend_services_introduce here is likely as bogus as the
comments were.
2011-10-30 02:17:06 -07:00
Robert Ransom 290b4dc3d6 Use a more meaningful variable name 2011-10-30 02:17:06 -07:00
Robert Ransom 68331cbd81 Determine whether an intro point was in the last HS desc in a sane way 2011-10-30 02:17:05 -07:00
Robert Ransom 3f6a2d3e2a Record which intro points were listed in the last HS desc 2011-10-30 02:17:05 -07:00
Robert Ransom 6f035cb2b4 Record the number of INTRODUCE2 cells each intro point has received 2011-10-30 02:17:04 -07:00
Robert Ransom 6b26999146 Correct a log message 2011-10-30 02:17:01 -07:00
Robert Ransom c60148c7f5 Record the time at which each intro point was first published 2011-10-30 02:17:00 -07:00
Robert Ransom 6f220de7b9 Improve a comment 2011-10-30 02:17:00 -07:00
Robert Ransom 190aac0eab Allow different HSes to maintain different numbers of intro points 2011-10-30 02:16:59 -07:00
Robert Ransom fbea8c8ef1 Detect and remove unreachable intro points 2011-10-02 12:49:35 -07:00
Robert Ransom 34a6b8b7e5 Clear the timed_out flag when an HS connection attempt ends 2011-10-02 12:49:35 -07:00
Robert Ransom eaed37d14c Record intro point timeouts in rend_intro_point_t 2011-10-02 12:49:34 -07:00
Robert Ransom 6803c1c371 Refetch an HS's desc if we don't have a usable one
Previously, we wouldn't refetch an HS's descriptor unless we didn't
have one at all.  That was equivalent to refetching iff we didn't have
a usable one, but the next commit will make us keep some non-usable HS
descriptors around in our cache.

Code bugfix on the release that introduced the v2 HS directory system,
because rend_client_refetch_v2_renddesc's documentation comment should
have described what it actually did, not what its behaviour happened
to be equivalent to; no behaviour change in this commit.
2011-10-02 12:42:19 -07:00
Roger Dingledine 4a351b4b9e Merge branch 'maint-0.2.1' into maint-0.2.2
Conflicts:
	src/or/main.c
	src/or/router.c
2011-09-13 18:27:13 -04:00
Roger Dingledine 62ec584a30 Generate our ssl session certs with a plausible lifetime
Nobody but Tor uses certs on the wire with 2 hour lifetimes,
and it makes us stand out. Resolves ticket 4014.
2011-09-13 18:24:45 -04:00
Karsten Loesing d679ef623f Update to the September 2011 GeoIP database. 2011-09-12 11:43:51 +02:00
Robert Ransom 8ea6d29fe4 Demote 'INTRODUCE2 cell is too {old,new}' message to info level 2011-09-10 21:56:05 -04:00
Robert Ransom b10735903b Demote HS 'replay detected' log message for DH public keys to info level 2011-09-10 21:56:05 -04:00
Robert Ransom 07a5cf285a Describe rend_service_descriptor_t more completely 2011-09-10 19:09:01 -04:00
Robert Ransom aa900b17ca Describe rend_intro_point_t more completely 2011-09-10 19:05:53 -04:00
Robert Ransom c621e52883 Fix log message typo. 2011-09-10 16:15:52 -04:00
Nick Mathewson b0695c11eb Merge remote-tracking branch 'public/gcc-295-fix' into maint-0.2.2 2011-09-09 12:54:27 -04:00
Nick Mathewson 4467799f45 Merge remote-tracking branch 'public/enhance_replay_detection' into maint-0.2.2 2011-09-09 12:53:45 -04:00
Nick Mathewson cb9226bcdb Check for replays in PK-encrypted part of intro cell, not just in the g^x value 2011-09-09 12:49:47 -04:00
Nick Mathewson dfa6cde4d4 Merge remote-tracking branch 'public/bug2649_squashed' into maint-0.2.2 2011-09-07 14:43:06 -04:00
Nick Mathewson 2bf0e7479b Fix assertion in addressmap_clear_excluded_trackexithosts
Fixes bug 3923; bugfix on 0.2.2.25-alpha; bugfix from 'laruldan' on trac.
2011-09-06 20:26:20 -04:00
Nick Mathewson 0ac4b0f99d Check for lround with autoconf; fall back to rint. 2011-08-30 22:22:15 -04:00
Sebastian Hahn 03760f6c6f Fix a compilation issue on older FreeBSDs 2011-08-30 20:45:49 -04:00
Nick Mathewson 393e4fb5b5 Use %f with printf-style formatting, not %lf
For printf, %f and %lf are synonymous, since floats are promoted to
doubles when passed as varargs.  It's only for scanf that we need to
say "%lf" for doubles and "%f" for floats.

Apparenly, some older compilers think it's naughty to say %lf and like
to spew warnings about it.

Found by grarpamp.
2011-08-30 20:44:42 -04:00
Nick Mathewson 561ab14a5e Switch a SMARTLIST_FOREACH in circuitbuild.c to BEGIN/END
It had some cpp stuff inside, and older GCCs don't like preprocessor
directives inside macro arguments.

Found by grarpamp.
2011-08-30 20:44:30 -04:00
Gisle Vanem 5939c09d35 lround() missing in MSVC
lround() is missing in MS Visual-C's <math.h>. Not available anywhere.
Here is an easy patch.
2011-08-24 13:52:44 -04:00
Nick Mathewson d79d648edc Don't write ControlPorts to disk till after we setuid and make datadir
Fix for bug 3747; bugfix on 0.2.2.26-beta.
2011-08-17 11:22:16 -04:00
Robert Ransom 03f6ee8c5f Remove extra quotation marks around the result of esc_for_log 2011-08-15 10:54:19 -04:00
Nick Mathewson f570470830 Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2 2011-08-08 17:21:21 -04:00
Karsten Loesing c75ee94ab4 Update to the August 2011 GeoIP database. 2011-08-08 16:57:01 +02:00
Nick Mathewson 718252b253 Check return value in fmt_addr
Previously, if tor_addr_to_str() returned NULL, we would reuse the
last value returned by fmt_addr().  (This could happen if we were
erroneously asked to format an AF_UNSPEC address.)  Now instead we
return "???".
2011-07-20 13:17:48 -04:00
Robert Ransom f021df5824 Specify text or binary mode in every start_writing_to_stdio_file call 2011-07-19 11:11:34 -04:00
Nick Mathewson 866a2828bd Merge branch 'bug3577' into maint-0.2.2 2011-07-14 17:20:01 -04:00
Nick Mathewson 2e34416c6d Improve error msg on failed getinfo fingerprint 2011-07-14 17:19:52 -04:00
Nick Mathewson 5000e59b5f Change GETINFO fingerprint to look at server_mode, not my_descriptor
It's possible for us to be a server and have a fingerprint without
having yet generated a descriptor.

Fixes bug 3577; bugfix on 0.2.0.1-alpha
2011-07-13 12:45:18 -04:00
Roger Dingledine 8e3830352f Merge branch 'maint-0.2.1' into maint-0.2.2 2011-07-07 13:29:02 -04:00
Roger Dingledine 51d6e95023 update to the july 2011 geoip db 2011-07-07 13:28:36 -04:00
Sebastian Hahn 3ab09763ce Correctly send a SUCCEEDED event for rdns requests
The issue was that we overlooked the possibility of reverse DNS success
at the end of connection_ap_handshake_socks_resolved(). Issue discovered
by katmagic, thanks!
2011-07-07 05:38:38 +02:00
Roger Dingledine 4f74979173 appease check-spaces 2011-07-06 00:48:22 -04:00
Nick Mathewson 335ff915c7 Merge remote-tracking branch 'rransom-tor/bug3465-022' into maint-0.2.2 2011-07-05 15:52:11 -04:00
Nick Mathewson 06f0c1aa6a Merge branch 'cov217_022_squashed' into maint-0.2.2 2011-07-01 12:56:14 -04:00
Nick Mathewson bc91cb6e45 Use strlcpy when copying node IDs into measured_bw_line_t
We were using strncpy before, which isn't our style for stuff like
this.

This isn't a bug, though: before calling strncpy, we were checking
that strlen(src) was indeed == HEX_DIGEST_LEN, which is less than
sizeof(dst), so there was no way we could fail to NUL-terminate.
Still, strncpy(a,b,sizeof(a)) is an idiom that we ought to squash
everyplace.

Fixes CID #427.
2011-07-01 12:56:07 -04:00