Nick Mathewson
176fde505f
Tweak bug2716 patch a little
...
Name the magic value "10" rather than re-deriving it.
Comment more.
Use the pattern that works for periodic timers, not the pattern that
doesn't work. ;)
2011-03-12 00:19:52 -05:00
Nick Mathewson
d52a99dc77
Merge remote branch 'origin/maint-0.2.2'
2011-03-11 23:34:46 -05:00
Nick Mathewson
d34a5cdc59
Merge branch 'hsdir_assignment' into maint-0.2.2
2011-03-11 23:30:25 -05:00
Nick Mathewson
3a0c602155
Clarify threat description and avoid negative uptimes.
2011-03-11 23:27:53 -05:00
Roger Dingledine
977e396e86
improve accuracy for when a relay went unreachable
2011-03-11 22:12:15 -05:00
Roger Dingledine
600ad7bf8d
Merge commit 'sebastian/bug2663' into maint-0.2.2
2011-03-11 20:37:21 -05:00
Sebastian Hahn
f7a3cdc8f2
Use observed instead of declared uptime for HSDir
...
It is important to verify the uptime claim of a relay instead of just
trusting it, otherwise it becomes too easy to blackhole a specific
hidden service. rephist already has data available that we can use here.
Bugfix on 0.2.0.10-alpha.
2011-03-11 18:44:35 +01:00
Sebastian Hahn
473ff26563
Fix two compile warnings when using clang
...
Issue found by Steven Murdoch
2011-03-10 01:48:19 +01:00
Roger Dingledine
e569e6b201
Merge branch 'maint-0.2.2'
2011-03-08 18:16:27 -05:00
Roger Dingledine
6426cd14f3
Merge branch 'maint-0.2.1' into maint-0.2.2
2011-03-08 18:16:06 -05:00
Roger Dingledine
d080fe8db1
move to march 2011 geoip file
2011-03-08 18:15:17 -05:00
Nick Mathewson
63651b9191
Merge remote branch 'origin/maint-0.2.2'
...
Trivial conflicts fixed in or.h
Conflicts:
src/or/or.h
2011-03-08 16:20:53 -05:00
Nick Mathewson
00446973f2
Merge remote branch 'sebastian/bug2250' into maint-0.2.2
2011-03-08 16:13:28 -05:00
Nick Mathewson
f9bb3ced51
Merge remote branch 'origin/maint-0.2.2'
...
Resolved trivial one-line conflicts.
Conflicts:
src/or/dirserv.c
src/or/rephist.c
2011-03-08 16:10:40 -05:00
Nick Mathewson
0d78a16c36
Merge remote branch 'sebastian/bug1035' into maint-0.2.2
2011-03-08 15:52:43 -05:00
Nick Mathewson
d5907e7d9d
Merge remote branch 'origin/maint-0.2.2'
2011-03-08 15:23:30 -05:00
Nick Mathewson
9ad083d573
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
2011-03-08 15:20:48 -05:00
Nick Mathewson
9a6df21539
Avoid crash in any_pending_bridge_descriptor_fetches
...
This is based on shitlei's fix for bug2629, with extra parens removed.
Fixes bug 2629, bugfix on 0.2.1.2-alpha.
2011-03-08 15:17:41 -05:00
Nick Mathewson
26009a3ed0
Merge remote branch 'origin/maint-0.2.2'
2011-03-07 17:12:08 -05:00
Nick Mathewson
3bd83b8fb6
Merge remote branch 'sebastian/bug2660' into maint-0.2.2
2011-03-07 17:09:23 -05:00
Sebastian Hahn
2f8e96b553
Fix log message when we have too few dirauths
...
The calculation of when to send the logmessage was correct, but we
didn't give the correct number of relays required: We want more than
half of all authorities we know about. Fixes bug 2663.
2011-03-07 00:06:36 +01:00
Nick Mathewson
176e8a0a2a
Merge remote branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/routerparse.c
2011-03-06 13:46:11 -05:00
Nick Mathewson
35fcec3880
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
2011-03-06 13:42:28 -05:00
Nick Mathewson
4fa70e11ed
Merge branch 'real_ipv6_fix' into maint-0.2.1
2011-03-06 13:42:05 -05:00
Nick Mathewson
2ce132e335
Oops, here's the *REAL* fix for the ipv6 issue
...
We need to _REJECT_ descriptors with accept6/reject6 lines. If we
let them onto the network , other un-upgraded tors will crash.
2011-03-06 13:41:55 -05:00
Nick Mathewson
0f637492e3
Merge branch 'careful_with_all_descs' into maint-0.2.1
2011-03-06 13:35:42 -05:00
Nick Mathewson
3da0837b0b
Revert "Disallow reject6 and accept6 lines in descriptors"
...
This reverts commit b3918b3bbb
.
2011-03-06 13:26:38 -05:00
Nick Mathewson
07b8b439c4
Merge remote branch 'origin/maint-0.2.2'
2011-03-06 13:23:02 -05:00
Nick Mathewson
ed14888e7e
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
...
Conflicts:
src/or/policies.c
2011-03-06 13:20:21 -05:00
Nick Mathewson
8b01fd7bad
exit_policy_is_general_exit is IPv4 only; it should admit it.
2011-03-06 13:16:53 -05:00
Sebastian Hahn
9f614507b6
Merge branch 'maint-0.2.1' into maint-0.2.2
2011-03-06 18:25:44 +01:00
Sebastian Hahn
b3918b3bbb
Disallow reject6 and accept6 lines in descriptors
...
This fixes a remotely triggerable assert on directory authorities, who
don't handle descriptors with ipv6 contents well yet. We will want to
revert this once we're ready to handle ipv6.
Issue raised by lorth on #tor, who wasn't able to use Tor anymore.
Analyzed with help from Christian Fromme. Fix suggested by arma. Bugfix
on 0.2.1.3-alpha.
2011-03-06 18:20:28 +01:00
Sebastian Hahn
f83debb51d
Fix setting target port in get_interface_address6
...
We want to use the discard port correctly, so a htons() was missing.
Also we need to set it correctly depending on address family.
Review provided by danieldg
2011-03-05 16:58:20 +01:00
Sebastian Hahn
865ea5d263
Fix connect() failures in get_interface_address6()
...
The third argument for connect should be dependent on the address
family. Issue spotted by piebeer who also wrote the patch.
2011-03-05 16:57:05 +01:00
Nick Mathewson
bcbc8c51cb
Do not serve encrypt-only descriptors with the "all" request. Reported by piebeer
2011-03-04 00:04:25 -05:00
Nick Mathewson
f608872b0c
C style fix: a no-args function is void fn(void), not void fn().
2011-03-03 23:42:14 -05:00
Nick Mathewson
8ae179deec
Add a magic field to tor_tls_t to catch exdata corruption bugs, if any appear.
2011-03-03 23:41:34 -05:00
Robert Ransom
74fc993b98
Check the result of SSL_set_ex_data
...
Reported by piebeer.
2011-03-03 16:17:39 -08:00
Robert Ransom
fe1137be6f
Use SSL_*_ex_data instead of SSL_*_app_data
...
SSL_*_app_data uses ex_data index 0, which will be the first one allocated
by SSL_get_ex_new_index. Thus, if we ever started using the ex_data feature
for some other purpose, or a library linked to Tor ever started using
OpenSSL's ex_data feature, Tor would break in spectacular and mysterious
ways. Using the SSL_*_ex_data functions directly now may save us from
that particular form of breakage in the future.
But I would not be surprised if using OpenSSL's ex_data functions at all
(directly or not) comes back to bite us on our backends quite hard. The
specified behaviour of dup_func in the man page is stupid, and
crypto/ex_data.c is a horrific mess.
2011-03-03 15:34:53 -08:00
Robert Ransom
13ee803469
Remove now-unused helper functions
...
These functions were needed only by code removed in the preceding commit.
Reported by mobmix.
2011-03-03 14:59:21 -08:00
Gladys Shufflebottom
49de5431d5
remove tls related hash table code
2011-03-01 18:11:25 -05:00
Nick Mathewson
d60a7c2f8d
Merge remote branch 'origin/maint-0.2.2'
2011-03-01 17:15:37 -05:00
Nick Mathewson
6b7408178b
Avoid spurious bwhist parsing failures
...
This should fix a bug that special ran into, where if your state file
didn't record period maxima, it would never decide that it had
successfully parsed itself unless you got lucky with your
uninitialized-variable values.
This patch also tries to improve error messags in the case where a
maximum value legitimately doesn't parse.
2011-03-01 17:08:02 -05:00
Sebastian Hahn
5c7c5e593f
Tweak the bug2250 fix slightly
...
Rename the _UsingTestingTorNetwork hidden option to
_UsingTestNetworkDefaults (thanks Nick for the suggestion) and added a
changes file.
2011-03-01 10:05:18 +01:00
Nick Mathewson
42c1a47123
Revert bug1074_launch_authconn* branch: needs more design, less crashing
2011-02-28 12:58:29 -05:00
Sebastian Hahn
5a4f7fa1e4
clarify an assert
...
also log about running changes, even on a bridge authority.
2011-02-26 09:42:44 +01:00
Sebastian Hahn
34e47d1052
Fix GETINFO config-text for private networks
...
In private networks, the defaults for some options are changed. This
means that in options_validate(), where we're testing that the defaults
are what we think they are, we fail. Use a workaround by setting a
hidden configuration option _UsingTestingTorNetwork when we have altered
the configuration this way, so that options_validate() can do the right
thing.
Fixes bug 2250, bugfix on 0.2.1.2-alpha (the version introducing private
network options).
2011-02-26 09:11:41 +01:00
Nick Mathewson
b3d74045ae
Add a missing const
2011-02-25 12:32:29 -05:00
Nick Mathewson
a47fdaf9a0
Merge branch 'bug1074_launch_conn_on_skew'
...
Fixed conflict on rename of router_get_by_digest->router_get_by_id_digest
Conflicts:
src/or/command.c
2011-02-25 12:12:44 -05:00
Nick Mathewson
c94f3711ee
whitespace fixup
2011-02-25 12:05:33 -05:00
AltF4
612c7f3242
Fix for #1074 previous rev
...
Changed tor_addr_from_ipv4n to tor_addr_from_ipv4h
and changed descriptor_digest to identity_digest
2011-02-25 11:57:16 -05:00
AltF4
24096d0cec
Fix for #1074 "Part 3"
...
Changed received_netinfo_from_trusted_dir into a
tristate in order to keep track of whether we have
already tried contacting a trusted dir. So we don't
send multiple requests if we get a bunch of skews.
2011-02-25 11:57:15 -05:00
AltF4
82023f6a1e
Sebastian's Changes to #1074
...
Fixes some small mistakes with AltF4's #1074 fix
2011-02-25 11:57:15 -05:00
AltF4
b8bef61a8f
Fix time skew values from untrusted sources
...
Now when we receive a large time skew from a source which isn't a trusted dir, we go contact a trusted dir to trigger a NETINFO cell.
2011-02-25 11:57:11 -05:00
Nick Mathewson
a2a8adeee5
Merge remote branch 'origin/maint-0.2.2'
2011-02-25 11:24:35 -05:00
Nick Mathewson
aa178aae03
Merge branch 'bug1863_bwhist' into maint-0.2.2
2011-02-25 11:22:12 -05:00
Karsten Loesing
0642b92792
Fix two potential bugs in the bug1863 code.
2011-02-24 16:44:54 +01:00
Nick Mathewson
0a6beb9368
Fix memory leak in md-download logic
...
Also fix some microdesc comments
Fix for bug 2623
2011-02-24 09:47:33 -05:00
Nick Mathewson
feaa0120d0
Merge remote branch 'sebastian/osx_compile'
2011-02-24 09:27:04 -05:00
Sebastian Hahn
303c04109b
Fix a couple of compile warnings on OS X 10.6
2011-02-24 07:19:09 +01:00
Nick Mathewson
9265164180
Merge remote branch 'origin/maint-0.2.2'
...
There was a conflict from the node_t transition, but it was an easy fix.
Conflicts:
src/or/circuitbuild.c
2011-02-22 18:41:06 -05:00
Roger Dingledine
a2727f6249
prevent same entry and exit for insane edge case
2011-02-22 17:54:25 -05:00
Nick Mathewson
491abbc65e
Merge remote branch 'public/bug1859_021' into maint-0.2.1
2011-02-22 17:19:41 -05:00
Nick Mathewson
7605985b3f
Merge remote branch 'public/bug2402_nothing' into maint-0.2.1
2011-02-22 15:54:13 -05:00
Nick Mathewson
2eadbd41f0
Merge remote branch 'sebastian/bug2496'
2011-02-22 14:17:11 -05:00
Nick Mathewson
b7f201f746
Merge remote branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/policies.c
src/or/policies.h
2011-02-22 14:10:42 -05:00
Nick Mathewson
cdc59c198a
Don't let bad DNS make exit policy and declared exit policy get out of sync
...
Patch from "postman" on trac. Fixes bg 2366. Bug on 0.1.2.5-alpha.
2011-02-22 14:06:28 -05:00
Nick Mathewson
46b07462ae
Merge remote branch 'origin/maint-0.2.2'
2011-02-22 13:02:42 -05:00
Nick Mathewson
9d5873cdae
Merge branch 'log_domains' into maint-0.2.2
2011-02-22 13:01:02 -05:00
Nick Mathewson
ce149c1022
That shalt also not have a label without a statement.
2011-02-22 12:52:52 -05:00
Nick Mathewson
933ffd536d
Merge remote branch 'origin/maint-0.2.2'
2011-02-22 12:47:47 -05:00
Nick Mathewson
613073e449
Merge remote branch 'sebastian/bug2504' into maint-0.2.2
2011-02-22 12:47:21 -05:00
Nick Mathewson
eb403b4696
Tweak some names and comments in asn's heartbeat patch
2011-02-22 12:41:22 -05:00
George Kadianakis
ee95430d39
Implement more heartbeat message stuff.
...
(This squashes multiple commits:
* Adds uptime monitoring support.
* Adds circuit counting code.
* Trivially tweaks the documentation.
* Trivial run_scheduled_events() code tweaking.
* Adds a status.h to export functions.
* Added bandwidth monitoring code.
* Added consensus presense detection code.
* Restricts the precision of the bandwidth output.
* Various fixes.
* Fixed style and spacing problems.
* Tidied up src/or/Makefile.am
* Couple of minor fixes on status.c functions.
* 'Implemented' client heartbeat support
)
2011-02-22 12:40:38 -05:00
Sebastian Hahn
098b6ba72d
Initial heartbeat subsystem commit.
...
Sets:
* Documentation
* Logging domain
* Configuration option
* Scheduled event
* Makefile
It also creates status.c and the log_heartbeat() function.
All code was written by Sebastian Hahn. Commit message was
written by me (George Kadianakis).
2011-02-22 12:40:36 -05:00
Nick Mathewson
0ba69714b4
Merge remote branch 'sebastian/bug2444'
2011-02-22 11:10:57 -05:00
Nick Mathewson
d120ee1c63
Merge remote branch 'origin/maint-0.2.2'
2011-02-22 01:03:06 -05:00
Robert Ransom
444a955e4a
Don't crash a bridge authority on SIGHUP if it's not in the consensus
...
Fixes bug 2572.
2011-02-16 04:12:37 -08:00
Sebastian Hahn
5dbaf9dbd5
Windows has EACCES, not EACCESS
...
Once again spotted by mobmix
Also add a changes file for the fix
2011-02-11 17:02:26 +01:00
Roger Dingledine
1c5b19a31a
Merge branch 'maint-0.2.2'
2011-02-11 01:21:04 -05:00
Roger Dingledine
9b745cdbf9
Merge branch 'maint-0.2.1' into maint-0.2.2
2011-02-11 01:20:47 -05:00
Roger Dingledine
28de4d83fd
fix the other half of bug 1074
2011-02-10 17:11:06 -05:00
Nick Mathewson
50c259d763
Make the DH parameter we use for TLS match the one from Apache's mod_ssl
...
Our regular DH parameters that we use for circuit and rendezvous
crypto are unchanged. This is yet another small step on the path of
protocol fingerprinting resistance.
(Backport from 0.2.2's 5ed73e3807
)
2011-02-10 15:55:06 -05:00
Nick Mathewson
f1a004797e
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
doc/tor.1.txt
2011-02-10 15:52:04 -05:00
Robert Ransom
449d895f06
Merge branch 'bug2408-v2-021-common' into bug2408-v2-022
2011-02-09 03:05:21 -08:00
Robert Ransom
7bf06d4a4f
Ignore and warn about "PublishServerDescriptor hidserv"
...
Fixes #2408 .
2011-02-09 02:33:24 -08:00
Nick Mathewson
cc9809c1f7
Merge remote branch 'origin/maint-0.2.2'
2011-02-08 14:37:31 -05:00
Nick Mathewson
d43470ad8a
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
2011-02-08 14:37:02 -05:00
Nick Mathewson
f25fc6e650
Merge remote branch 'origin/maint-0.2.2'
2011-02-08 14:02:43 -05:00
Sebastian Hahn
9c7e2cf010
Locking failures on windows are indicated by EACCES
...
Patch our implementation of tor_lockfile_lock() to handle this case
correctly. Also add a note that blocking behaviour differs from windows
to *nix. Fixes bug 2504, issue pointed out by mobmix.
2011-02-08 18:35:07 +01:00
Roger Dingledine
7d2a91f5e5
support multihomed bridges (bug 2510)
2011-02-08 09:10:14 -05:00
Roger Dingledine
9a1a96ba09
don't use old non-configured bridges (bug 2511)
2011-02-08 08:08:47 -05:00
Roger Dingledine
bcbcda309a
move the clause above the "if bw is too low" check
2011-02-07 23:22:45 -05:00
Roger Dingledine
20b75989ac
dtrt when only relaybandwidthburst is set
...
fixes bug 2470
2011-02-07 23:21:33 -05:00
Roger Dingledine
4b6b398cff
Merge branch 'maint-0.2.2'
2011-02-07 22:21:01 -05:00
Roger Dingledine
54ccc80a4a
Merge branch 'maint-0.2.1' into maint-0.2.2
2011-02-07 22:20:35 -05:00
Karsten Loesing
9c2cb6fc89
Update to the February 1 2011 Maxmind GeoLite Country database.
2011-02-07 22:19:37 -05:00
Sebastian Hahn
9b64227ffd
Routers count as down when they change ORPort, too
...
rransom noticed that a change of ORPort is just as bad as a change of IP
address from a client's perspective, because both mean that the relay is
not available to them while the new information hasn't propagated.
Change the bug1035 fix accordingly.
Also make sure we don't log a bridge's IP address (which might happen
when we are the bridge authority).
2011-02-08 00:38:48 +01:00
Nick Mathewson
ff5810aea9
Merge remote branch 'origin/maint-0.2.2'
2011-02-07 12:47:04 -05:00
Nick Mathewson
98cef0ac1e
Merge branch 'bug2279' into maint-0.2.2
2011-02-07 12:43:54 -05:00