Karsten Loesing
2a61b0dd6b
Update to the July 2013 GeoIP database.
2013-07-08 10:21:28 +02:00
Karsten Loesing
1a43dfa603
Add 2 new manual A1 substitutions.
2013-07-08 10:14:42 +02:00
Nick Mathewson
15cd79f832
FIx undefined behavior in dirvote.c
...
Fix a bug in the voting algorithm that could yield incorrect results
when a non-naming authority declared too many flags. Fixes bug 9200;
bugfix on 0.2.0.3-alpha.
Found by coverity scan.
2013-07-03 12:01:37 -04:00
Nick Mathewson
f631b73cd5
Merge remote-tracking branch 'linus/bug8530'
2013-06-29 16:02:13 -04:00
Nick Mathewson
0c3d676f9e
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-29 03:51:53 -04:00
Nick Mathewson
c955149271
Give a warning when bufferevents are enabled.
...
Ticket 9147.
2013-06-29 03:45:40 -04:00
Nick Mathewson
cde1a2ca05
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-24 12:55:29 -04:00
Nick Mathewson
ca6aacce16
Fix bug 9122: don't allow newdefaultoptions to be NULL
...
(This caused a crash that was reported as bug 9122, but the underlying
behavior has been wrong for a while.)
Fix on 0.2.3.9-alpha.
2013-06-24 12:53:37 -04:00
Marek Majkowski
10480dff01
Fix #5584 - raise awareness of safer logging - warn about potentially unsafe config options
2013-06-24 11:22:34 -04:00
Marek Majkowski
1555876d5f
Fix #9108 - make global_circuitlist a doubly linked list
2013-06-20 16:56:54 +01:00
Marek Majkowski
d7538b57b4
Don't access global_circuitlist variable directly. Use a getter instead.
2013-06-20 16:40:05 +01:00
Nick Mathewson
f7986269c3
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-18 14:47:15 -04:00
Nick Mathewson
7c4544e5a4
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-06-18 14:45:29 -04:00
Nick Mathewson
8a96a85d66
Check more return values in the unit tests
2013-06-18 12:31:03 -04:00
Nick Mathewson
60d633c73a
Fix some problems with the bug9002 fix.
...
Fixes bug 9090; bug not in any released Tor.
2013-06-18 11:54:57 -04:00
Nick Mathewson
459c7c0e41
Attempt to un-confuse coverity about (false) double-free in bench_onion_ntor.
2013-06-18 11:33:15 -04:00
Nick Mathewson
9f8e672b50
Fix a couple of resource leaks in test_config.c
...
Spotted by Coverity Scan. Not in any released Tor.
2013-06-18 11:28:30 -04:00
Nick Mathewson
b5d1fded3d
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-18 10:25:30 -04:00
Nick Mathewson
efa342f5fa
Tweak bug9063_redux patch: {n_p}_chan_cells, not {n,p}_conn_cells
2013-06-18 10:25:10 -04:00
Nick Mathewson
d3063da691
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
...
Conflicts:
src/or/config.c
src/or/relay.c
2013-06-18 10:23:03 -04:00
Nick Mathewson
c37fdc2eef
Merge branch 'bug9063_redux_023_squashed' into maint-0.2.3
2013-06-18 10:16:47 -04:00
Nick Mathewson
2e1fe1fcf9
Implement a real OOM-killer for too-long circuit queues.
...
This implements "algorithm 1" from my discussion of bug #9072 : on OOM,
find the circuits with the longest queues, and kill them. It's also a
fix for #9063 -- without the side-effects of bug #9072 .
The memory bounds aren't perfect here, and you need to be sure to
allow some slack for the rest of Tor's usage.
This isn't a perfect fix; the rest of the solutions I describe on
codeable.
2013-06-18 10:15:16 -04:00
Linus Nordberg
538ca4153a
Invoke binaries in $PATH rather than by absolute path.
...
That security measure costs more than it gives.
So, keep your PATH sane and we can run this script on more than
one system.
2013-06-18 11:48:02 +02:00
Nick Mathewson
2974c83735
Merge remote-tracking branch 'public/bug9082'
2013-06-17 11:57:55 -04:00
Nick Mathewson
0748c06f7c
Fix bug 9082: avoid leak when freeing destroy cell queues
...
In my #7912 fix, there wasn't any code to remove entries from the
(channel, circuit ID)->circuit map corresponding to queued but un-sent
DESTROYs.
Spotted by skruffy. Fixes bug 9082; bug not in any released Tor.
2013-06-17 11:30:56 -04:00
Nick Mathewson
dc516a5436
Limit hidden service descriptors to at most 10 guard nodes.
...
Fixes bug 9002; bugfix on 0.1.1.11-alpha (which introduced guard
nodes), or on 0.0.6pre1 (which introduced hidden services).
2013-06-16 20:24:48 -04:00
Andrea Shepard
469bd7a3cf
Merge branch 'bug9072-024' into bug9072-025
2013-06-15 02:27:23 -07:00
Andrea Shepard
9e45d940d4
Merge branch 'bug9072-023' into bug9072-024
2013-06-15 02:20:19 -07:00
Andrea Shepard
2a95f31716
Disable middle relay queue overfill detection code due to possible guard discovery attack
2013-06-15 02:16:00 -07:00
dana koch
7f67becf30
Instead of testing for __GNUC__, use CHECK_SCANF, like CHECK_PRINTF.
...
This lets us have the possibility of fine-tuning the check in the tor_sscanf test cases at a later date.
2013-06-14 10:52:00 -04:00
Linus Nordberg
b567efcfff
Use CHUTNEY_PATH to find Chutney.
2013-06-14 14:17:42 +02:00
Nick Mathewson
6f5a720d15
Merge branch 'circuit_queue_cap-0.2.5-squashed'
...
Conflicts:
src/or/relay.c
2013-06-14 01:50:17 -04:00
Nick Mathewson
bd6bd1c9be
Fix signed/unsigned comparison warning
2013-06-14 01:41:53 -04:00
Nick Mathewson
c974582291
Increase the limit so leaky pipe might work
2013-06-14 01:40:35 -04:00
Nick Mathewson
79cdf81ec1
Increase the limit so leaky pipe might work
2013-06-14 01:37:22 -04:00
Nick Mathewson
9e8c104ab8
Increase the limit so leaky pipe might work
2013-06-14 01:35:21 -04:00
Andrea Shepard
459aada4d0
Don't queue more cells as a middle relay than the spec allows to be in flight
2013-06-13 21:59:01 -07:00
Andrea Shepard
418c2845d0
Don't queue more cells as a middle relay than the spec allows to be in flight
2013-06-13 21:53:36 -07:00
Andrea Shepard
4cce58d3c2
Don't queue more cells as a middle relay than the spec allows to be in flight
2013-06-13 21:39:04 -07:00
Nick Mathewson
483385d2bd
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-13 21:59:27 -04:00
Nick Mathewson
2338681efb
Define SEEK_SET for platforms that lack it.
2013-06-13 21:56:35 -04:00
Nick Mathewson
73ca1cf8b7
Rename networkstatus_dl_interval() -> networkstatus_dl_check_interval()
2013-06-13 12:44:46 -04:00
Nick Mathewson
45424b2ca1
Merge remote-tracking branch 'linus/bug8532'
2013-06-13 12:42:49 -04:00
Nick Mathewson
caa0d15c49
If we write the annotation but not the microdescriptor, rewind.
...
This fixes bug 9047 (and some parts of 9031, 8922, 8883 that weren't
fixed in 8822). Bugfix on 0.2.2.6-alpha.
2013-06-13 12:29:01 -04:00
Linus Nordberg
c82d7950ad
Add make target test-network running traffic tests in a Chutney network.
...
This implements ticket #8530 .
2013-06-13 16:33:56 +02:00
Nick Mathewson
4b781e24fb
Merge remote-tracking branch 'public/bug7912_squashed'
2013-06-13 10:31:02 -04:00
Nick Mathewson
e61df2ec65
Fix compile warnings wrt printf formating of int64_t
2013-06-13 10:30:34 -04:00
Andrea Shepard
16f9861b22
Add destroy balance tracking and logging to circuitmux
2013-06-13 10:14:36 -04:00
Nick Mathewson
43d53e6d86
Implementation of a fix for bug 7912
...
I added the code to pass a destroy cell to a queueing function rather
than writing it immediately, and the code to remember that we
shouldn't reuse the circuit id until the destroy is actually sent, and
the code to release the circuit id once the destroy has been sent...
and then I finished by hooking destroy_cell_queue into the rest of
Tor.
2013-06-13 10:14:00 -04:00
Nick Mathewson
801eea03ad
Code to track on a circuit whether it has a "pending" delete cell
...
This will be used in a fix for bug7912.
2013-06-13 10:14:00 -04:00
Nick Mathewson
2949849143
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-13 09:43:53 -04:00
Nick Mathewson
25dddf7a8f
Merge remote-tracking branch 'public/bug8822' into maint-0.2.4
2013-06-13 09:40:32 -04:00
Nick Mathewson
d7d6529898
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-12 20:55:53 -04:00
Nick Mathewson
75b7cc1785
Merge remote-tracking branch 'andrea/bug8639_v3' into maint-0.2.4
2013-06-12 20:55:35 -04:00
Marek Majkowski
16d1dd134a
Fix #9043 - simplyfy the code and use EVP_PKEY_cmp instead of pkey_eq / tor_tls_evp_pkey_eq
2013-06-12 13:02:06 -04:00
Nick Mathewson
616fd790ec
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-12 13:01:14 -04:00
Nick Mathewson
e602c4031b
Make all consumers of microdesc_t.body tolerate NULL
...
This is another fix to try to mitigate recurrences of 8031/8822.
2013-06-12 12:12:11 -04:00
Nick Mathewson
f455686b77
Unmap the microdescriptor cache before replacing it.
...
This is a reprise of the fix in bdff7e3299d78; 6905c1f6
reintroduced
that bug. Briefly: windows doesn't seem to like deleting a mapped
file. I tried adding the PROT_SHARED_DELETE flag to the createfile
all, but that didn't actually fix this issue. Fortunately, the unit
test I added in 4f4fc63fea
should
prevent us from making this particular screw-up again.
This patch also tries to limit the crash potential of a failure to
write by a little bit, although it could do a better job of retaining
microdescriptor bodies.
Fix for bug 8822, bugfix on 0.2.4.12-alpha.
2013-06-12 12:04:33 -04:00
Nick Mathewson
fff9386af8
Revert "Use the FILE_SHARE_DELETE flag for CreateFile on a mapping"
...
This reverts commit 884a0e269c
.
I'm reverting this because it doesn't actually make the problem go
away. It appears that instead we need to do unmap-then-replace.
2013-06-12 10:45:48 -04:00
Nick Mathewson
a64d062c95
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-12 10:01:10 -04:00
Nick Mathewson
3bdc4e5fee
Merge remote-tracking branch 'public/bug2077_share_delete' into maint-0.2.4
2013-06-12 10:00:33 -04:00
Nick Mathewson
884a0e269c
Use the FILE_SHARE_DELETE flag for CreateFile on a mapping
...
A comment by rransom on #8795 taken together with a comment by doorss
recorded on #2077 suggest that *every* attempt to replace the md cache
will fail on Vista/Win7 if we don't have the FILE_SHARE_DELETE flag
passed to CreateFile, and if we try to replace the file ourselves
before unmapping it. I'm adding the FILE_SHARE_DELETE, since that's
this simplest fix. Broken indexers (the favored #2077 hypothesis)
could still cause trouble here, but at least this patch should make us
stop stepping on our own feet.
Likely fix for #2077 and its numerous duplicates. Bugfix on
0.2.2.6-alpha, which first had a microdescriptor cache that would get
replaced before remapping it.
2013-06-12 09:53:46 -04:00
Nick Mathewson
4f4fc63fea
Expand microdesc cache tests
...
Is it possible that *every* attempt to replace the microdesc cache on
windows 7 is going to fail because of our lack of FILE_SHARE_DELETE
while opening the file? If so, this test will catch #2077 and let us
know when it's fixed.
2013-06-12 09:30:09 -04:00
Linus Nordberg
c132427db4
Hide consensus download interval, depending on TestingTorNetwork, in a macro.
2013-06-10 23:04:20 +02:00
Arlo Breault
6fc3997307
Fix tor-fw-helper exit code.
...
It's returning the number of initialized backends.
(changes file added by nickm; this is a fix for bug #9030 )
2013-06-10 14:28:21 -04:00
Nick Mathewson
c94f6b228b
Fix "make check-spaces"
2013-06-10 13:51:53 -04:00
Nick Mathewson
7f9066ceee
Make OPENSSL_free(dh_string_repr) conditional.
2013-06-10 13:49:13 -04:00
Nick Mathewson
aaaf082ed6
Merge remote-tracking branch 'majek/bug5170'
2013-06-10 13:47:57 -04:00
Nick Mathewson
c300720bfa
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-10 12:28:30 -04:00
Nick Mathewson
607b29ae1a
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-06-10 12:26:39 -04:00
Nick Mathewson
4835faebf5
Merge branch 'bug9017' into maint-0.2.3
2013-06-10 12:25:14 -04:00
Nick Mathewson
77a1935339
Fix (Open?)BSD fast-connect bug with optimistic data.
...
There's an assertion failure that can occur if a connection has
optimistic data waiting, and then the connect() call returns 0 on the
first attempt (rather than -1 and EINPROGRESS). That latter behavior
from connect() appears to be an (Open?)BSDism when dealing with remote
addresses in some cases. (At least, I've only seen it reported with
the BSDs under libevent, even when the address was 127.0.0.1. And
we've only seen this problem in Tor with OpenBSD.)
Fixes bug 9017; bugfix on 0.2.3.1-alpha, which first introduced
optimistic data. (Although you could also argue that the commented-out
connection_start_writing in 155c9b80
back in 2002 is the real source
of the issue.)
2013-06-10 12:14:49 -04:00
Marek Majkowski
d769cd82b5
Bug #5170 - make pkey_eq testable, introduce test_tortls.c
2013-06-10 16:21:39 +01:00
Marek Majkowski
e4f51682bc
Bug #5170 - test crypto_pk_get_all_digests
2013-06-10 15:03:18 +01:00
Linus Nordberg
4d54b9774d
Add support for offsetting the voting interval in order to bootstrap faster.
...
A new option TestingV3AuthVotingStartOffset is added which offsets the
starting time of the voting interval. This is possible only when
TestingTorNetwork is set.
This patch makes run_scheduled_events() check for new consensus
downloads every second when TestingTorNetwork, instead of every
minute. This should be fine, see #8532 for reasoning.
This patch also brings MIN_VOTE_SECONDS and MIN_DIST_SECONDS down from
20 to 2 seconds, unconditionally. This makes sanity checking of
misconfiguration slightly less sane.
Addresses #8532 .
2013-06-08 15:25:32 +02:00
Marek Majkowski
68be3469c5
Bug 5170 - simplify i2d_PublicKey in pkey_eq
2013-06-06 13:32:46 +01:00
Marek Majkowski
a022930fda
Bug #5170 - simplify i2d_X509
2013-06-06 12:45:25 +01:00
Marek Majkowski
6f1c67195c
Bug #5170 - also simplify i2d_DHparams
2013-06-06 12:13:24 +01:00
Marek Majkowski
2132d036e3
Bug #5170 - i2d_RSAPublicKey supports allocating its own output buffer
2013-06-06 11:45:35 +01:00
Nick Mathewson
bcdc002269
Merge remote-tracking branch 'karsten/geoip-manual-update-jun2013'
2013-06-05 11:22:48 -04:00
Nick Mathewson
7159e19ea9
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-05 11:22:36 -04:00
Nick Mathewson
c860a96ecb
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-06-05 11:22:19 -04:00
Nick Mathewson
fe689de084
Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
2013-06-05 11:22:02 -04:00
Karsten Loesing
d34753174e
Update to the June 2013 GeoIP database.
2013-06-05 08:43:03 +02:00
Karsten Loesing
9b233acd03
Remove 9 now unused manual A1 substitutions.
2013-06-05 08:40:39 +02:00
Andrea Shepard
ce147a2a9a
When launching a resolve request on behalf of an AF_UNIX control, omit the address field of the new entry connection. Fixes bug 8639.
2013-05-31 15:35:51 -07:00
Nick Mathewson
4d7ac69f05
Fix windows compilation warning in test_config.c
...
bugfix on 78cc5833a1da038331186ddf07f4add7f8f1094b; bug not in any
released Tor.
Spotted by weasel using Jenkins.
2013-05-29 12:08:28 -04:00
Nick Mathewson
97d1caadfd
Start correctly when not in testing mode.
...
You can't use != to compare arbitary members of or_options_t.
(Also, generate a better error message to say which Testing* option
was set.)
Fix for bug 8992. Bugfix on b0d4ca49
. Bug not in any released Tor.
2013-05-28 16:13:06 -04:00
Nick Mathewson
d3125a3e40
Merge remote-tracking branch 'karsten/task-6752-3'
2013-05-28 10:59:35 -04:00
Karsten Loesing
3795f6a78b
Try harder to document default_options correctly.
2013-05-25 07:33:37 +02:00
Nick Mathewson
eef42d3863
Reformat 4282 fixes a little
2013-05-24 13:37:14 -04:00
Nick Mathewson
57e4324c42
Fix a logic error in 4282 fixes
...
check_or_create_data_subdir has succeeded when it returns 0, not
when it returns negative.
2013-05-24 13:36:15 -04:00
Nick Mathewson
58721ac24c
Tweak 4282 unit tests for style, safety, correctness.
...
We do our filesystem wrangling relative to get_fname() results, so
that if we fail or crash, we can always clean up.
2013-05-24 13:31:10 -04:00
Peter Retzlaff
78cc5833a1
Unit tests for check_or_create_data_subdir and write_to_data_subdir.
2013-05-24 13:13:21 -04:00
Peter Retzlaff
5b7eaa3765
Extract duplicate code in geoip and rephist.
...
Create new methods check_or_create_data_subdir() and
write_to_data_subdir() in config.c and use them throughout
rephist.c and geoip.c.
This should solve ticket #4282 .
2013-05-24 13:12:18 -04:00
Nick Mathewson
b4b0063e48
Tweak fix for #8789 a bit; avoid double-close and add changes file
2013-05-24 12:23:21 -04:00
Arlo Breault
d25e77f2c3
Close socket at err target.
...
In connection_listener_new().
See #8789 .
2013-05-24 12:05:57 -04:00
Karsten Loesing
b0d4ca4990
Tweak #6752 patch based on comments by nickm.
2013-05-24 10:28:31 +02:00
Nick Mathewson
f5820a1bf1
Restore 8093 log messages to WARN severity, but rate limit
...
See #8093 for discussion
2013-05-21 14:00:30 -04:00
Nick Mathewson
feeef00a6a
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-05-21 13:46:28 -04:00
Nick Mathewson
30c06c187a
Downgrade the unexpected sendme cell warnings for 0.2.4
...
See discussion on #8093
2013-05-21 13:45:21 -04:00
Nick Mathewson
cb488f9973
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-05-20 15:59:08 -04:00
Andrea Shepard
a2e72ac04a
Copy-paste description of PathBias params from man page to or.h comment
2013-05-20 12:46:00 -07:00
Nick Mathewson
826daaf726
Merge remote-tracking branch 'karsten/geoip-manual-update-may2013'
2013-05-20 12:42:36 -04:00
Nick Mathewson
c90c370ab3
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-05-20 12:37:58 -04:00
Nick Mathewson
0c2fb64d6f
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-05-20 12:37:21 -04:00
Nick Mathewson
78735f8778
Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
2013-05-20 12:34:59 -04:00
Nick Mathewson
382dbe9819
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-05-17 14:54:19 -04:00
Nick Mathewson
bc56918e5a
Fix bug 8846: better log message on IP version confusion
2013-05-17 14:50:45 -04:00
Arlo Breault
0ab38b9366
Remove PK_PKCS1_PADDING
...
See #8792
2013-05-17 10:11:33 -04:00
Karsten Loesing
1293835440
Lower dir fetch retry schedules in testing networks.
...
Also lower maximum interval without directory requests, and raise
maximum download tries.
Implements #6752 .
2013-05-16 12:08:48 +02:00
Nick Mathewson
95c34399cf
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-05-15 14:35:37 -04:00
Nick Mathewson
31a6b4e11f
Fix unit tests to pass after fix for #8879
2013-05-15 14:34:59 -04:00
Nick Mathewson
69f66b960c
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-05-15 10:44:17 -04:00
Roger Dingledine
0bfaf86612
Fix socks5 handshake for username/password auth
...
The fix for bug 8117 exposed this bug, and it turns out real-world
applications like Pidgin do care. Bugfix on 0.2.3.2-alpha; fixes bug 8879.
2013-05-15 03:34:37 -04:00
Arlo Breault
88a780d899
Check the return value of memchr().
...
For quality-of-implementation in munge_extrainfo_into_routerinfo().
See #8791
2013-05-14 12:23:17 -04:00
Karsten Loesing
f8053179c9
Update to the May 2013 GeoIP database.
2013-05-13 15:37:43 +02:00
Karsten Loesing
d93caf7f0a
Update GeoIP file script and manual substitutions.
...
Script changes now catch more cases when our manual substitutions need to
be updated.
Manual substitutions are updated to May 2013 database.
2013-05-13 15:35:01 +02:00
Arlo Breault
73b98948a2
Remove strcpy from unit tests.
...
See #8790 .
2013-05-11 23:33:41 -04:00
Andrea Shepard
50beb81d53
Merge branch 'maint-0.2.4'
2013-05-10 21:05:34 -07:00
Andrea Shepard
aaa3a085db
Merge bug5595-v2-squashed into maint-0.2.4
2013-05-10 19:39:48 -07:00
Andrea Shepard
54f41d68e9
Add some unit tests for fp_pair_map_t to test/containers.c based on the strmap tests
2013-05-09 10:55:07 -07:00
Andrea Shepard
ac73ceb728
Rephrase comment in trusted_dirs_load_certs_from_string() to reflect 5595 fix
2013-05-09 10:55:07 -07:00
Andrea Shepard
17692b2fe2
Make warning in authority_cert_dl_failed() LD_BUG per NickM code review
2013-05-09 10:55:07 -07:00
Andrea Shepard
2824bf3445
Use tor_asprintf() and clean up string handling in authority_certs_fetch_missing()
2013-05-09 10:55:02 -07:00
Andrea Shepard
c0d96bae66
Clean up ugly constants in connection_dir_download_cert_failed(), and fix a broken one
2013-05-09 10:55:02 -07:00
Andrea Shepard
7b6ee54bdc
Avoid duplicate downloads by (fp,sk) and by fp for authority certs when bootstrapping
2013-05-09 10:55:01 -07:00
Andrea Shepard
fddb814fea
When downloading certificates, distinguish requesting by identity digest from requesting by ID digest, signing key pair; fixes bug 5595
2013-05-09 10:55:01 -07:00
Andrea Shepard
d5bd4a4763
Implement fp_pair_map_t
2013-05-09 10:54:55 -07:00
Nick Mathewson
82ab33c9a6
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-05-09 13:20:01 -04:00
Nick Mathewson
bae5dd6c8d
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-05-09 13:14:53 -04:00
Nick Mathewson
00e2310f12
Don't run off the end of the array-of-freelists
...
This is a fix for bug 8844, where eugenis correctly notes that there's
a sentinel value at the end of the list-of-freelists that's never
actually checked. It's a bug since the first version of the chunked
buffer code back in 0.2.0.16-alpha.
This would probably be a crash bug if it ever happens, but nobody's
ever reported something like this, so I'm unsure whether it can occur.
It would require write_to_buf, write_to_buf_zlib, read_to_buf, or
read_to_buf_tls to get an input size of more than 32K. Still, it's a
good idea to fix this kind of thing!
2013-05-09 13:10:48 -04:00
Nick Mathewson
8f21838ee5
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-05-08 13:01:58 -04:00
Nick Mathewson
7d3fd85838
Fix bug 8845: check the right length of memory in aes unit tests
...
This couldn't actually be a buffer overrun unless AES somehow turned
into memcpy, but still it's good to fix it.
2013-05-08 12:59:43 -04:00
Andrea Shepard
9c58905a2b
Merge branch 'maint-0.2.4' into master
2013-05-07 02:24:08 -07:00
Nick Mathewson
a1d7f7ea50
Use a clearer idiom for node identity in router_counts_toward_thresholds
2013-05-05 18:55:19 -04:00
Nick Mathewson
139d367f29
Fix 8833: crash bug from using NULL node->ri in dirserv.c
...
It appears that moria1 crashed because of one instance of this (the
one in router_counts_toward_thresholds). The other instance I fixed
won't actually have broken anything, but I think it's more clear this
way.
Fixes bug 8833; bugfix on 0.2.4.12-alpha.
2013-05-05 18:52:53 -04:00
Nick Mathewson
ef83db4fe8
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-24 22:16:07 -04:00
Nick Mathewson
f8bb0064d6
Merge remote-tracking branch 'public/bug6026' into maint-0.2.4
2013-04-24 22:15:47 -04:00
Nick Mathewson
68ea7d24d8
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-24 22:05:41 -04:00
Mike Perry
ac22bf27d7
Increase the pathbias state file miscounting version check.
...
We now know the bug is present in 0.2.4.12-alpha too. It should be fixed in
0.2.4.13-alpha, though.
2013-04-24 22:03:03 -04:00
Mike Perry
2170f89a93
Bug 8235: Fix scaling adjustments.
...
We need to subtract both the current built circuits *and* the attempted
circuits from the attempt count during scaling, since *both* have already been
counted there.
2013-04-24 22:03:02 -04:00
Nick Mathewson
6defb10d72
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-18 22:45:12 -04:00
Nick Mathewson
b933360ee8
Add a boolean to flag-thresholds for "we have enough measured bandwidth"
...
Implements #8711 .
2013-04-18 22:43:52 -04:00
Nick Mathewson
0124b10d28
Turn on ntor by default client-side
...
Implements #8561 .
2013-04-18 22:35:15 -04:00
Nick Mathewson
ab3d5c0490
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-18 21:42:39 -04:00
Nick Mathewson
e35ca13528
Merge remote-tracking branch 'public/bug8716_023' into maint-0.2.4
2013-04-18 21:33:53 -04:00
Nick Mathewson
1b5320bfe3
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-18 11:28:11 -04:00
Nick Mathewson
06efbbb47e
Merge remote-tracking branch 'public/bug8719' into maint-0.2.4
2013-04-18 11:26:54 -04:00
Nick Mathewson
da30adcf0f
Merge remote-tracking branch 'origin/maint-0.2.4'
...
Conflicts:
src/common/crypto.c
2013-04-18 11:16:05 -04:00
Nick Mathewson
9fec0c1a95
Remove a double-newline
2013-04-18 11:14:05 -04:00
Nick Mathewson
8362f8854a
Merge branch 'less_charbuf_rebased' into maint-0.2.4
...
Conflicts:
src/or/dirserv.c
src/or/dirserv.h
src/test/test_dir.c
2013-04-18 11:13:36 -04:00
Nick Mathewson
4b15606fa2
Add unit test for encoding ntor key in routerinfo
2013-04-18 11:04:58 -04:00
Nick Mathewson
cb74b5a152
Remove the unused pk3 variable from test_dir_formats
2013-04-18 11:04:58 -04:00
Nick Mathewson
992bbd02f9
Re-enable test for parsing and generating descriptor with exit policy
...
Looks like I turned this off in 6ac42f5e
back in 2003 and never got
around to making it work again. There has been no small amount of
code drift.
2013-04-18 11:04:58 -04:00
Nick Mathewson
4d672f3ae3
Test networkstatus_getinfo_helper_single
2013-04-18 11:04:58 -04:00
Nick Mathewson
0f83fcc5c2
Add a quick-and-dirty-test for generate_v2_networkstatus.
...
It sure is a good thing we can run each test in its own process, or
else the amount of setup I needed to do to make this thing work
would have broken all the other tests.
Test mocking would have made this easier to write too.
2013-04-18 11:04:58 -04:00
Nick Mathewson
6706a05b79
Remove the now-unused router_get_networkstatus_v3_hash
2013-04-18 11:04:57 -04:00
Nick Mathewson
c35ef8e6e9
Test improvement: include microdesc lines in our synthetic microdesc consensuses.
2013-04-18 11:04:57 -04:00
Nick Mathewson
e1128d905c
Fix a couple of documentation issues.
2013-04-18 11:04:57 -04:00
Nick Mathewson
d2d5a7dabc
Remove some now-needless length defines
2013-04-18 11:04:57 -04:00
Nick Mathewson
28ef450b24
Remove RS_ENTRY_LEN
...
Nothing uses it any longer now that we use smartlists of strings for
stuff that manipulates iles of formatted routerstatuses.
2013-04-18 11:04:57 -04:00
Nick Mathewson
cb75519bbf
Refactor dirobj signature generation
...
Now we can compute the hash and signature of a dirobj before
concatenating the smartlist, and we don't need to play silly games
with sigbuf and realloc any more.
2013-04-18 11:04:57 -04:00
Nick Mathewson
fd93622cc8
Use chunks, not buffers, for router descriptors
2013-04-18 11:04:56 -04:00
Nick Mathewson
1186628fa9
Refactor v2 networkstatus generation to avoid buffer-style
2013-04-18 11:04:56 -04:00
Nick Mathewson
9246a7ca58
Refactor routerstatus_format_entry to avoid character-buffers
2013-04-18 11:04:56 -04:00
Nick Mathewson
cd1cdae0fa
Fix some wide lines
2013-04-18 10:30:14 -04:00
Nick Mathewson
cd2b508f4e
Don't leak a waiting-for-certs consensus when accepting it.
...
I believe this was introduced in 6bc071f765
, which makes
this a fix on 0.2.0.10-alpha. But my code archeology has not extended
to actually testing that theory.
2013-04-17 11:53:52 -04:00
Nick Mathewson
0a9c17a61a
Fix memory leak when sending configuration-changed event
...
Fix for bug #8718 ; bugfix on 0.2.3.3-alpha.
2013-04-17 11:34:15 -04:00
Nick Mathewson
bb79373fe8
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-17 10:50:58 -04:00
Nick Mathewson
b00a6211c5
Merge remote-tracking branch 'public/bug7143_v2' into maint-0.2.4
2013-04-17 10:49:59 -04:00
Nick Mathewson
bbc049a756
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-17 10:48:39 -04:00
Nick Mathewson
42731f69ef
Merge branch 'bug8037_squashed' into maint-0.2.4
2013-04-17 10:45:45 -04:00
Nick Mathewson
0cf2c01dbd
Reject most directory documents with an internal NUL.
...
(Specifically, we reject all the ones that aren't NUL-terminated,
since a NUL-terminated thing can't have a NUL in the middle.)
Another fix for #8037 .
2013-04-17 10:45:27 -04:00
Nick Mathewson
d34d0b4dc5
Merge remote-tracking branch 'origin/maint-0.2.4'
...
Conflicts:
src/or/dirserv.c
2013-04-14 21:57:56 -04:00
Nick Mathewson
a6545d6335
Merge branch 'bug8683_rebased' into maint-0.2.4
2013-04-14 21:48:44 -04:00
Nick Mathewson
f3ae628517
Remove a now-empty if body; invert the sense of its condition
2013-04-14 21:47:29 -04:00
Nick Mathewson
c4de828923
Remvoe total_bandwidth and total_exit_bandwidth as unused.
2013-04-14 21:47:29 -04:00
Nick Mathewson
52cadff0d6
Rename all fields which measure bw in kb to end with _kb
2013-04-14 21:45:05 -04:00
Nick Mathewson
49696786fb
Fix some KB/B confusion in flag threshold minima.
2013-04-14 21:43:50 -04:00
Roger Dingledine
9a4e9b4a80
fix trivial typo
2013-04-12 04:27:10 -04:00
Nick Mathewson
63ab5f4849
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-12 01:14:32 -04:00
Nick Mathewson
97246a5b6d
Merge remote-tracking branch 'public/bug5650_squashed' into maint-0.2.4
2013-04-12 01:13:22 -04:00
Nick Mathewson
39ac1db60e
Avoid busy-looping on WANTREAD within connection_handle_write
...
Fix for bug 5650. Also, if we get a WANTREAD while reading while
writing, make sure we're reading.
2013-04-12 01:11:31 -04:00
Roger Dingledine
d028c005da
socks5 will ask for username/password if we offer it
...
Commit a264c4fe
made the socks5 server prefer auth 2 if it's offered,
but it didn't update the unit test to expect it.
2013-04-11 10:37:41 -04:00
Nick Mathewson
265a7ebca6
Use credible_bandwidth uniformly in setting/using fast_bandwidth
...
We were using credible_bandwidth to build the fast_bandwidth
threshold, but comparing it to bandwidth_for_router.
2013-04-11 10:36:46 -04:00
Nick Mathewson
ec4ee3197f
Use correct units for dirserv_get_{credible_bandwidth,bandwidth_for_router}
...
We were mixing bandwidth file entries (which are in kilobytes) with
router_get_advertised_bw() entries, which were in bytes.
Also, use router_get_advertised_bandwidth_capped() for credible_bandwidth.
2013-04-11 10:26:17 -04:00
Roger Dingledine
7ed1af3671
socks5 will ask for username/password if we offer it
...
Commit a264c4fe
made the socks5 server prefer auth 2 if it's offered,
but it didn't update the unit test to expect it.
2013-04-11 02:53:26 -04:00
Nick Mathewson
e54a5a4f3c
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-11 01:47:10 -04:00
Nick Mathewson
922ab0883d
Merge remote-tracking branch 'public/bug8185_diagnostic' into maint-0.2.4
2013-04-11 01:46:28 -04:00
Nick Mathewson
1b026efc62
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-11 01:43:14 -04:00
Nick Mathewson
ee3cc44f27
Merge remote-tracking branch 'public/bug7302' into maint-0.2.4
...
Conflicts:
src/or/status.c
2013-04-11 01:42:54 -04:00
Nick Mathewson
3dfd1ebf12
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-11 01:40:31 -04:00
Nick Mathewson
7f50af116f
Merge remote-tracking branch 'public/bug8117_023' into maint-0.2.4
...
Conflicts:
doc/tor.1.txt
src/or/config.c
src/or/connection.c
2013-04-11 01:39:55 -04:00
Roger Dingledine
8e7226cf7f
fix text in function comment
...
(now that we moved to libevent)
2013-04-11 01:11:25 -04:00
Nick Mathewson
5d4f43eb4a
Merge remote-tracking branch 'karsten/geoip-manual-update-apr2013'
2013-04-08 11:10:37 -04:00
Nick Mathewson
1bbfadfa61
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-08 11:10:07 -04:00
Nick Mathewson
6acf0ac285
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-04-08 11:09:50 -04:00
Nick Mathewson
9630fb917f
Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
2013-04-08 11:09:26 -04:00
Karsten Loesing
b41f03f6df
Update to the April 2013 GeoIP database.
2013-04-08 12:18:40 +02:00
Karsten Loesing
c8925550c6
Manually fix 'A1' ranges.
...
MaxMind changed twelve 'A1' ranges in their April 2013 database that the
the substitution algorithm couldn't fix. Fix them manually.
2013-04-08 12:13:12 +02:00
Nick Mathewson
25f9ecf4b2
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-05 16:58:26 -04:00
Nick Mathewson
3367a7611e
Merge remote-tracking branch 'desoxy/bug-8596' into maint-0.2.4
2013-04-05 16:57:53 -04:00
Nick Mathewson
55817c4c50
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-05 16:53:07 -04:00
Peter Palfrader
d1dc23c938
test.c: Try to create a more random temporary directory for our workspace (re: Bug#8638)
2013-04-05 16:51:48 -04:00
Desoxy
74f5e304e4
Controller: Add CACHED keyword to ADDRMAP events ( #8596 part 2/2)
...
Add keyword CACHED="YES"/"NO" to ADDRMAP control events to indicate whether the
DNS response will be cached or not.
2013-04-03 18:50:51 +02:00
Desoxy
2c40138210
Controller: Always send ADDRMAP event after RESOLVE command ( #8596 part 1/2)
...
Since 7536c40
only DNS results for real SOCKS requests are added to the cache,
but not DNS results for DNSPort queries or control connection RESOLVE queries.
Only cache additions would trigger ADDRMAP events on successful resolve.
Change it so that DNS results received after a RESOLVE command also generate
ADDRMAP events.
2013-04-03 18:50:27 +02:00
Nick Mathewson
b349f09b47
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-03 09:36:59 -04:00
Nick Mathewson
33b7083f26
Fix a wide line
2013-04-03 09:36:37 -04:00
Mike Perry
56e7dff7bd
Add additional checks for Path Bias scaling.
...
Just in case more issues remain with scaling, it would be nice to pin-point
them as such.
2013-04-03 09:32:15 -04:00
Mike Perry
2b05a8c671
Clip invalid path bias counts at startup.
...
There was a bug in Tor prior to 0.2.4.10-alpha that allowed counts to
become invalid. Clipping the counts at startup allows us to rule out
log messages due to corruption from these prior Tor versions.
2013-04-03 09:32:15 -04:00
Nick Mathewson
a934376049
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-02 10:42:53 -04:00
Nick Mathewson
856d57531b
Merge remote-tracking branch 'public/bug7707_diagnostic' into maint-0.2.4
2013-04-02 10:41:14 -04:00
Nick Mathewson
7ccaf3f1a4
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-02 10:37:00 -04:00
Nick Mathewson
2c155064aa
Merge remote-tracking branch 'public/bug8427' into maint-0.2.4
2013-04-02 10:36:15 -04:00
Akshay Hebbar Y S
36acde6b4e
Removed obsolete code related to cached-routers
2013-04-01 21:50:35 -04:00
Nick Mathewson
c1a2be9ffe
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-29 12:26:01 -04:00
Mike Perry
9117b14218
Bug #8196 : Demote a path bias notice that can be caused by controllers.
...
We didn't see this in normal usage anyway.
2013-03-29 12:21:28 -04:00
Mike Perry
651e49713c
Bug 8419: Apply the badexit fix from #2203 to validatio too
...
This was causing dirauths to emit flag weight validation warns if there
was a sufficiently large amount of badexit bandwidth to make a difference in
flag weight results.
2013-03-29 12:20:54 -04:00
Mike Perry
f6a2f088fd
Bug 8477: Don't warn if fromerly GENERAL circuits still have streams.
...
This can happen in various cases of network failure.
2013-03-29 12:20:54 -04:00
Mike Perry
a7d6683629
Bug 8230: Mark circuits as opened before reachability testing.
...
Should silence two path bias Bug messages seen on relays at startup.
2013-03-29 12:20:54 -04:00
Nick Mathewson
c3cc79ec38
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-29 12:19:05 -04:00
Mike Perry
d39e6736fe
Don't relax the timeout for already opened 1-hop circuits.
2013-03-29 12:17:05 -04:00
Mike Perry
66586da9bc
Add detail to log messages related to bug 7799.
...
Note this does not solve bug 7799, it is only to help us diagnose it.
2013-03-29 12:17:04 -04:00
Nick Mathewson
097a08f6fe
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-28 09:33:58 -04:00
Karsten Loesing
1bce70a9e3
Make PathsNeededToBuildCircuits option work.
2013-03-28 09:32:19 -04:00
Nick Mathewson
eb9b282cc2
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-27 21:07:36 -04:00
Nick Mathewson
7f8098d2d0
Add some missing case values to please clang
...
It seems that some versions of clang that would prefer the
-Wswitch-enum compiler flag to warn about switch statements with
missing enum values, even if those switch statements have a
default.
Fixes bug 8598; bugfix on 0.2.4.10-alpha.
2013-03-27 21:04:08 -04:00
Mike Perry
87d50d0617
Clarify liveness log message and lower it to notice.
...
It could just be due to small clock jumps, after all.
2013-03-27 16:22:43 -07:00
Mike Perry
65c0489dd4
Bug 6572: Use timestamp_created for liveness sanity checks.
...
This should eliminate potential regressions caused by #7341 .
2013-03-26 20:28:19 -07:00
Nick Mathewson
e62b8051ee
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-26 22:20:33 -04:00
Mike Perry
914bfe765d
Bug 7065: Use $ for idhex instead of =
2013-03-26 18:49:41 -07:00
Nick Mathewson
80e9ca411f
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-23 18:51:15 -04:00
Nick Mathewson
8b6a952c94
Avoid clang warnings from implicit off_t->size_t cast
2013-03-23 18:50:21 -04:00
Nick Mathewson
9a6514ce4f
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-22 12:41:16 -04:00
Nick Mathewson
1b6b8b0564
Fix an uninitialized-var warning in unit tests
...
Found by formorer; fix on 42fb61d172
, not in any released Tor.
2013-03-22 12:38:55 -04:00
Nick Mathewson
967503c12c
Implement a placeholder mechanism in the channel,id->circ map
...
We'll use this to help fix bug 7912, by providing a way to mark
that a circuit ID can't get reused while a DESTROY is queued but not sent.
2013-03-21 11:55:07 -04:00
Nick Mathewson
294c89f238
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-21 07:53:46 -04:00
Nick Mathewson
42fb61d172
Fix a small memory leak in the unit tests
...
Found by coverity; this is CID 992692.
2013-03-21 07:52:36 -04:00
Nick Mathewson
e9ffd9890f
Remove check for whether bridge_line->digest is NULL
...
It can never be NULL, since it's an array in bridge_line_t.
Introduced in 266f8cddd8
. Found by coverity; this is CID 992691. Bug
not in any released Tor.
2013-03-21 07:47:42 -04:00
Nick Mathewson
ea6d53e724
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-21 07:25:24 -04:00
Nick Mathewson
6196d0e83d
The *default* guard lifetime is two months; the *min* is one
...
This caused an assertion failure when pruning guards.
Fixes bug #8553 ; bug not in any released Tor.
2013-03-21 07:22:59 -04:00
Nick Mathewson
fa3c237739
Per-SOCKSPort configuration for bug 8117 fix.
...
This might be necessary if the bug8117 fix confuses any applications.
Also add a changes file.
2013-03-20 16:17:06 -04:00
Nick Mathewson
a264c4feda
Prefer SOCKS_USER_PASS over SOCKS_NO_AUTH
2013-03-20 15:37:47 -04:00
Nick Mathewson
7c2eabcf8e
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-20 14:47:49 -04:00
Nick Mathewson
3412054987
Merge remote-tracking branch 'public/bug8475_023' into maint-0.2.4
2013-03-20 14:47:13 -04:00
Nick Mathewson
a87f22ef64
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-20 14:26:22 -04:00
Andrea Shepard
5c5198e713
Set default minimum bandwidth for exit flag to zero for TestingTorNetwork
2013-03-20 11:16:41 -07:00
Andrea Shepard
8e29a7ae1d
Fix an EOL@EOF in circuituse.c
2013-03-20 11:03:18 -07:00
Nick Mathewson
a660fe6fd5
Let testing networks override ABSOLUTE_MIN_VALUE_FOR_FAST_FLAG
...
This adds a new option to fix bug 8508 which broke chutney
networks. The bug was introduced by 317d16de
.
2013-03-20 13:34:57 -04:00
Nick Mathewson
63a42b38b1
Merge remote-tracking branch 'public/unsigned-time_t'
2013-03-20 10:53:07 -04:00
Nick Mathewson
80c987fbb4
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-20 10:34:31 -04:00
Nick Mathewson
5b0b51ca3f
Merge remote-tracking branch 'public/bug6304_v3' into maint-0.2.4
...
Conflicts:
src/or/circuitbuild.c
src/or/config.c
2013-03-20 10:31:56 -04:00
Nick Mathewson
7d1ade251b
Debugging log for bug 8185
...
If the bug recurs, log the filename and line number that triggered it
2013-03-19 17:00:40 -04:00
Nick Mathewson
96d39fd236
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 16:44:00 -04:00
Nick Mathewson
ca50fb4f81
Don't assert when writing a cell to a CLOSING connection.
...
Instead, drop the cell.
Fixes another case of bug 7350; bugfix on 0.2.4.4-alpha
2013-03-19 16:35:40 -04:00
Nick Mathewson
96e8e30ee3
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 16:17:42 -04:00
Nick Mathewson
323cb655be
Merge remote-tracking branch 'public/bug7164_diagnostic' into maint-0.2.4
2013-03-19 16:16:48 -04:00
Nick Mathewson
c547502ecb
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 16:15:39 -04:00
Nick Mathewson
6f20a74d52
Merge branch 'bug8240_v2_squashed' into maint-0.2.4
...
Conflicts:
doc/tor.1.txt
src/or/circuitbuild.c
src/or/config.c
src/or/or.h
2013-03-19 16:15:27 -04:00
Nick Mathewson
18752bca5b
Drop the minimum guard lifetime back down to one month
...
Mike believes that raising the default to 2 months with no way to lower
it may create horrible load-balancing issues.
2013-03-19 16:04:40 -04:00
Nick Mathewson
cf734a08f6
Add support for days of the week to intervals
2013-03-19 16:03:58 -04:00
Nick Mathewson
343f7aa059
Make the guard lifetime configurable and adjustable via the consensus
...
Fixes 8240.
(Don't actually increase the default guard lifetime. It seems likely to
break too many things if done precipitiously.)
2013-03-19 16:02:19 -04:00
Nick Mathewson
acbfc9c8cc
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 15:32:44 -04:00
Nick Mathewson
a7b46336eb
Merge remote-tracking branch 'public/bug7950' into maint-0.2.4
2013-03-19 15:32:17 -04:00
Nick Mathewson
60fd08f40b
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 15:13:07 -04:00
Nick Mathewson
60d1442136
Merge remote-tracking branch 'public/bug7768' into maint-0.2.4
2013-03-19 15:11:47 -04:00
David Fifield
03efe54027
Use option name --test-commandline in tor-fw-helper.
...
It was previously --Test in the help output and --test-commandline in
the getopt call. The man page already had --test.
(Originally by David, who resolved the tie in favor of "--test"; I
chose --test-commandline" instead so that nothing that depended
on it could break. -Nick)
2013-03-19 15:09:44 -04:00
Nick Mathewson
01af92fede
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 14:27:00 -04:00
Nick Mathewson
8d29866bec
Merge remote-tracking branch 'public/bug8002' into maint-0.2.4
2013-03-19 14:26:45 -04:00
Nick Mathewson
084c857704
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 14:19:19 -04:00
Nick Mathewson
de7e99f8bb
Merge remote-tracking branch 'public/bug8031' into maint-0.2.4
2013-03-19 14:18:07 -04:00
Nick Mathewson
e6602f5991
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 14:16:46 -04:00
Nick Mathewson
c101ecc8dc
Merge remote-tracking branch 'asn/bug3594_rebased_and_fixed'
...
Conflicts:
src/common/util.c
src/or/entrynodes.h
2013-03-19 13:25:45 -04:00
Nick Mathewson
4eaca17f2f
Merge branch 'bug7582_v2' into maint-0.2.4
2013-03-19 12:29:29 -04:00
Nick Mathewson
73a35dc3c0
Free prepend_policy values in origin circuits
2013-03-19 12:29:08 -04:00
Nick Mathewson
6e94d2fb3a
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 16:36:52 -04:00
Nick Mathewson
597cd893c5
Merge remote-tracking branch 'public/bug6174' into maint-0.2.4
2013-03-18 16:36:25 -04:00
Nick Mathewson
b0f7af1615
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 16:34:29 -04:00
Nick Mathewson
01407f9718
Merge remote-tracking branch 'public/bug8062' into maint-0.2.4
2013-03-18 16:33:47 -04:00
Nick Mathewson
899c2805b1
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 15:57:51 -04:00
Nick Mathewson
bd9901bef2
Handle TRUNCATE correctly if our next channel isn't done yet.
...
Patch from 'cypherpunks'. Fixes bug #7947 . Bugfix on 0.0.7.1.
2013-03-18 15:55:55 -04:00
Nick Mathewson
d404b0200f
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 15:46:01 -04:00
Nick Mathewson
aa4fcc4f13
Merge remote-tracking branch 'public/bug6164' into maint-0.2.4
2013-03-18 15:45:49 -04:00
Nick Mathewson
e5b79b5bb5
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 15:44:45 -04:00
Nick Mathewson
0b827cbcb1
Fix another case of bug 8206; patch from flupzor
2013-03-18 15:44:23 -04:00
Nick Mathewson
19d6650f81
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 15:41:14 -04:00
Nick Mathewson
eff1cfaaf7
Merge remote-tracking branch 'public/bug6673' into maint-0.2.4
2013-03-18 15:40:50 -04:00
Nick Mathewson
c8c86c9b23
Fix a double-newline
2013-03-18 15:39:47 -04:00
Nick Mathewson
5124bc251a
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 15:39:21 -04:00
Nick Mathewson
ad8a27a393
Fix some wide lines
2013-03-18 15:39:11 -04:00
Nick Mathewson
a88f3e24ea
Merge remote-tracking branch 'origin/maint-0.2.4'
...
Conflicts:
src/test/test_addr.c
2013-03-18 15:29:32 -04:00
Nick Mathewson
2ac66e59f7
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
...
Conflicts:
src/test/test_addr.c
2013-03-18 15:28:39 -04:00
Nick Mathewson
ebb95d0f78
Merge remote-tracking branch 'public/bug8377' into maint-0.2.3
2013-03-18 15:27:50 -04:00
Nick Mathewson
67709398b6
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 15:18:56 -04:00
Nick Mathewson
5959d1c105
Merge remote-tracking branch 'andrea/bug8435' into maint-0.2.4
2013-03-18 15:17:11 -04:00
Nick Mathewson
41cff47c6a
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 15:16:11 -04:00
Nick Mathewson
3f837d4826
Make stream events for RESOLVE lookups more consistent
...
Fixes 8203; patch by Desoxy
2013-03-18 15:13:59 -04:00
Andrea Shepard
0164f16f70
Improve comment for routers_with_measured_bw static var in dirserv.c
2013-03-18 12:04:41 -07:00
Andrea Shepard
e9bdb695e8
Improve comment on router_counts_toward_thresholds()
2013-03-18 11:58:30 -07:00
Andrea Shepard
d64e5969f4
Add dirserv_has_measured_bw() predicate wrapper for dirserv_query_measured_bw_cache()
2013-03-18 11:56:42 -07:00
Nick Mathewson
f15d9cf5db
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 14:50:36 -04:00
Nick Mathewson
26639b7798
Merge remote-tracking branch 'public/no_dup_guards' into maint-0.2.4
2013-03-18 14:50:01 -04:00
Nick Mathewson
1512747656
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 14:32:18 -04:00
Nick Mathewson
173efa1051
Merge remote-tracking branch 'public/bug8059' into maint-0.2.4
2013-03-18 14:31:50 -04:00
Nick Mathewson
a770e1cc22
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 14:30:28 -04:00
Nick Mathewson
57ffef3f89
Remove an unused local variable.
2013-03-18 14:30:11 -04:00
Nick Mathewson
63b67577d6
Check return values from fcntl and setsockopt
...
(Based on a patch from flupzor; bug #8206 )
2013-03-18 14:28:38 -04:00
Nick Mathewson
3fa9c9b688
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-18 14:24:30 -04:00
Nick Mathewson
eb9420082d
Check for 0.2.4.8, not 0.2.4.7, to determine EXTEND2 support
...
Fixes bug 8464; bugfix on b2863739
in 0.2.4.8-alpha
2013-03-18 14:23:19 -04:00
Andrea Shepard
f93f7e331b
Ignore advertised bandwidths if we have enough measured bandwidths available
2013-03-18 11:15:21 -07:00
Nick Mathewson
f48daef299
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-15 12:38:55 -04:00
Nick Mathewson
8b4728ebd6
Merge remote-tracking branch 'public/bug8180_023_v2' into maint-0.2.4
2013-03-15 12:38:11 -04:00
Nick Mathewson
686aaa5c4c
Upgrade the warn for EntryNodes without UseEntryGuards to an error
...
fixes bug 8180
2013-03-15 12:34:29 -04:00
Nick Mathewson
b163e801bc
Merge remote-tracking branch 'origin/maint-0.2.4'
...
Conflicts:
src/or/routerlist.c
2013-03-15 12:20:17 -04:00
Nick Mathewson
0cf327dc78
Merge remote-tracking branch 'public/unused_stuff' into maint-0.2.4
2013-03-15 12:17:23 -04:00
Nick Mathewson
e4d2177d31
Fix some basic socket issues with tor-fw-helper-natpmp on windows
...
This isn't going to be the last of these issues, but we might as
well take the fixes as we find them.
Patch from Gisle Vanem, fixes bug 7280.
2013-03-15 12:11:38 -04:00
David Fifield
a0b92cd800
Fix brackets in tor-fw-helper help output.
...
Change nesting from [(]) to [()]. Formerly it made it look to me at
first glance that "internal port" was optional.
[Trivial change; fixes #7767 --nickm]
2013-03-15 11:23:47 -04:00
Nick Mathewson
9be3389dc7
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-14 12:06:58 -04:00
Nick Mathewson
653b09e1ec
Make circuit_purpose_to_string handle CIRCUIT_PURPOSE_PATH_BIAS_TESTING
2013-03-14 12:06:03 -04:00
Nick Mathewson
1b28f366b8
Apply ClientDNSRejectInternalAddresses to IPv6 in RESOLVED cells
...
Fixes bug 8475; bugfix on 0.2.0.7-alpha.
2013-03-14 11:19:08 -04:00
Nick Mathewson
adfc3de833
Log fname:lineno in log messages for #7164
...
This should help us track down #7164 at last.
2013-03-13 10:42:58 -04:00
Nick Mathewson
b9a8f8c17c
Fix the warning about LearnCircuitBuildTimeout && !CircuitBuildTimeout
...
This is for bug 6304.
Add a changes file too
2013-03-13 09:17:43 -04:00
Nick Mathewson
7543fb61e3
Simplify the logic of circuit_build_times_get_initial_timeout.
2013-03-13 09:11:31 -04:00
Nick Mathewson
16f2e4aa8c
Don't warn about not sending a socks reply if we get a write error
...
If we get a write error on a SOCKS connection, we can't send a
SOCKS reply, now can we?
This bug has been here since 36baf7219
, where we added the "hey, I'm
closing an AP connection but I haven't finished the socks
handshake!" message. It's bug 8427.
2013-03-12 17:36:09 -04:00
Nick Mathewson
2b22c0aeef
On END_REASON_EXITPOLICY, mark circuit as unusable for that address.
...
Also, don't call the exit node 'reject *' unless our decision to pick
that node was based on a non-summarized version of that node's exit
policy.
rransom and arma came up with the ideas for this fix.
Fix for 7582; the summary-related part is a bugfix on 0.2.3.2-alpha.
2013-03-11 23:37:47 -04:00
Nick Mathewson
452cfaacfc
Track TLS overhead: diagnostic for bug 7707
2013-03-11 22:06:07 -04:00
Nick Mathewson
805ecb8719
Make control_event_bootstrap_problem always INFO when hibernating
...
When we're hibernating, the main reqason we can't bootstrap will
always be that we're hibernating: reporting anything else at severity
WARN is pointless.
Fixes part of 7302.
2013-03-11 20:52:20 -04:00
Nick Mathewson
34f07ec862
When hibernating, don't heartbeat about problems.
...
Fixes part of 7302.
2013-03-11 20:50:02 -04:00
Nick Mathewson
07e26005a6
Treat a changed IPv6 ORPort like an IPv4 one in retry_all_listeners()
...
Fix for bug 6026
2013-03-11 17:20:43 -04:00
Nick Mathewson
012068935a
Fix a bug in microdescs_add_to_cache when listed_at == -1
...
This bug affects hosts where time_t is unsigned, which AFAICT does
not include anything we currently support. (It _does_ include
OpenVMS, about a month of BSD4.2's history[1], and a lot of the 1970s.)
There are probably more bugs when time_t is unsigned. This one was
[1] http://mail-index.netbsd.org/tech-userlevel/1998/06/04/0000.html
2013-03-11 16:20:20 -04:00
Nick Mathewson
1eebb56691
Another possible diagnostic for 8031.
...
This time, I'm checking whether our calculated offset matches our
real offset, in each case, as we go along. I don't think this is
the bug, but it can't hurt to check.
2013-03-11 14:53:41 -04:00
Nick Mathewson
6905c1f60d
Check more error codes when writing microdescriptors.
...
Possible partial fix, or diagnosis tool, for bug 8031.
2013-03-11 14:51:18 -04:00
Nick Mathewson
d54ccbe9fd
Use fds, not stdio, to manage microdescriptor files
...
This is part of an attempt to mitigate 8031.
2013-03-11 14:37:44 -04:00
Nick Mathewson
d89b8e0751
Merge remote-tracking branch 'karsten/geoip-manual-update-mar2013'
2013-03-11 13:34:32 -04:00
Nick Mathewson
2a02efb601
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-11 13:32:35 -04:00
Nick Mathewson
ef4db31693
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-03-11 13:32:16 -04:00
Nick Mathewson
c6ca199888
Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
2013-03-11 13:32:01 -04:00
Nick Mathewson
fdafe11a25
Give an #error when we want threads and OpenSSL has disabled threads
...
Fixes ticket 6673.
2013-03-11 13:23:10 -04:00
Nick Mathewson
fca578d9b5
Increase link_proto field to 2 bytes
...
This should have been 2 bytes all along, since version numbers can
be 16 bits long. This isn't a live bug, since the call to
is_or_protocol_version_known in channel_tls_process_versions_cell
will reject any version number not in the range 1..4. Still, let's
fix this before we accidentally start supporting version 256.
Reported pseudonymously. Fixes bug 8062; bugfix on 0.2.0.10-alpha --
specifically, on commit 6fcda529
, where during development I
increased the width of a version to 16 bits without changing the
type of link_proto.
2013-03-11 12:34:14 -04:00
Nick Mathewson
b9037521c6
Fix a framing bug when reading versions from a versions cell.
...
Our ++ should have been += 2. This means that we'd accept version
numbers even when they started at an odd position.
This bug should be harmless in practice for so long as every version
number we allow begins with a 0 byte, but if we ever have a version
number starting with 1, 2, 3, or 4, there will be trouble here.
Fix for bug 8059, reported pseudonymously. Bugfix on 0.2.0.10-alpha
-- specifically, commit 6fcda529
, where during development I
increased the width of a version to 16 bits without changing the
loop step.
2013-03-11 12:29:28 -04:00
Roger Dingledine
331e4dcb46
Merge branch 'maint-0.2.4'
2013-03-10 23:42:14 -04:00
Roger Dingledine
0196647970
start part-way through the ssl cert lifetime
...
also, snap the start time and end time to a day boundary, since most
certs in the wild seem to do this.
2013-03-10 23:38:18 -04:00
Roger Dingledine
edd6f02273
randomize SSLKeyLifetime by default
...
resolves ticket 8443.
2013-03-10 23:38:18 -04:00
Roger Dingledine
599aeef9bc
parameterize SSLKeyLifetime
...
no actual changes in behavior yet
2013-03-10 23:38:18 -04:00
Nick Mathewson
aa3126b5b4
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-10 23:03:17 -04:00
Nick Mathewson
e270a066a6
Merge remote-tracking branch 'arma/bug6783_big_hammer' into maint-0.2.4
2013-03-10 23:01:58 -04:00
Nick Mathewson
e4c5001bad
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-10 23:00:13 -04:00
Benjamin Kerensa
8b4195f021
Fix typos in a few log messages
2013-03-10 22:59:19 -04:00
Roger Dingledine
f8960ea22b
set DisableV2DirectoryInfo_ off by default
...
since it's only enableable by authorities, nobody else would be able
to start their tor
2013-03-10 20:40:15 -04:00
Nick Mathewson
926b3d77f1
Tweak bug6783 patch.
2013-03-10 20:31:58 -04:00
Nick Mathewson
e4614d30e5
Add a DisableV2DirectoryInfo_ option to 404 all v2 ns requests
...
I have no idea whether b0rken clients will DoS the network if the v2
authorities all turn this on or not. It's experimental. See #6783 for
a description of how to test it more or less safely, and please be
careful!
2013-03-10 20:31:53 -04:00
Nick Mathewson
4235425fce
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-10 19:53:31 -04:00
Nick Mathewson
339df5df08
Fix 8447: use %u to format circid_t.
...
Now that circid_t is 4 bytes long, the default integer promotions will
leave it alone when sizeof(int) == 4, which will leave us formatting an
unsigned as an int. That's technically undefined behavior.
Fixes bug 8447 on bfffc1f0fc
. Bug not
in any released Tor.
2013-03-10 19:52:06 -04:00
Nick Mathewson
d13b996d83
Fix to test for bug8444 / 6034
2013-03-09 19:56:43 -05:00
Andrea Shepard
8027ebb5fd
Better comment for dirserv_query_measured_bw_cache()
2013-03-07 15:59:30 -08:00
Andrea Shepard
b522434834
Use DIGESTMAP_FOREACH_MODIFY in dirserv_expire_measured_bw_cache() for concision
2013-03-07 15:55:01 -08:00
Andrea Shepard
6e978ab829
Add unit test for dirserv measured bandwidth cache
2013-03-07 15:41:22 -08:00
Karsten Loesing
3dde6d5d29
Update to the March 2013 GeoIP database.
2013-03-07 20:58:31 +01:00
Karsten Loesing
5cad78c2ce
Manually fix yet another fourteen 'A1' ranges.
...
MaxMind added fourteen new 'A1' ranges in their March 2013 database that
the automatic substitution algorithm couldn't fix. Fix them manually.
2013-03-07 20:55:46 +01:00
Andrea Shepard
302d1dae6c
Make sure expiry check in dirserv_expire_measured_bw_cache() works if time_t is unsigned
2013-03-07 05:10:54 -08:00
Andrea Shepard
c7947619df
More constness in dirserv.c
2013-03-07 05:05:56 -08:00
Andrea Shepard
75eb79a6aa
Make dirserv_cache_measured_bw() use a const measured_bw_line_t *
2013-03-07 03:42:14 -08:00
Andrea Shepard
0efe96cae8
Call dirserv_clear_measured_bw_cache() from dirserv_free_all()
2013-03-05 13:11:43 -08:00
Nick Mathewson
62ef02ad65
A couple more easy unit tests
2013-03-02 10:56:57 -05:00
Nick Mathewson
55ce9bff54
Remove unused check_fingerprint_syntax
2013-03-01 22:01:26 -05:00
Nick Mathewson
a05dc378e3
Remove unused HMAC-SHA1 function
...
(We're not adding any new SHA1 instances in our protocols, so this
should never actually be needed.)
2013-03-01 21:59:12 -05:00
Nick Mathewson
289653c392
Remove a few more unused functions.
2013-03-01 21:57:52 -05:00
Nick Mathewson
a6c7630845
Unit tests for a few more functions and cases in address.c
...
This brings address's coverage up over 80%.
2013-03-01 14:48:33 -05:00
Nick Mathewson
6dfa709030
Remove the unused addr_mask_cmp_bits
2013-03-01 14:46:34 -05:00
Nick Mathewson
24fb926726
Remove the unused parse_addr_and_port_range
2013-03-01 14:35:17 -05:00
Nick Mathewson
f6697d5b3b
More unit tests for old TAP onion handshake.
...
The test coverage for onion_tap.c is now at 89%, up from 67%.
2013-03-01 14:06:09 -05:00
Nick Mathewson
165b2c0123
Add unit test for tor_addr_is_loopback
2013-03-01 12:40:41 -05:00
Nick Mathewson
b528aaef03
Make sure that [::1] is recognized as a private address
...
Fixes bug 8377; bugfix on 0.2.1.3-alpha.
2013-03-01 12:22:57 -05:00
Andrea Shepard
74c33945e3
Correctly set entry->is_dir_cache when adding an entry guard for the first time
...
(Second part of a bug8367 fix. -NM)
2013-03-01 10:17:07 -05:00
Nick Mathewson
ad49abe5a1
Fix bootstrapping with bridges by making is_dir_cache is set on them.
...
This fixes bug 8367, introduced in d7089ff228
. Not in
any released Tor.
2013-03-01 10:17:07 -05:00
Andrea Shepard
8b26766a66
Correctly set entry->is_dir_cache when adding an entry guard for the first time
...
(Second part of a bug8367 fix. -NM)
2013-03-01 09:32:37 -05:00
Nick Mathewson
c0b1f05fe7
Fix bootstrapping with bridges by making is_dir_cache is set on them.
...
This fixes bug 8367, introduced in d7089ff228
. Not in
any released Tor.
2013-03-01 09:32:17 -05:00
Nick Mathewson
c72d58cbff
Merge remote-tracking branch 'public/feature8109'
2013-03-01 00:33:37 -05:00
Nick Mathewson
94d0f226e6
Whoops. I forgot the "alpha"
2013-03-01 00:16:46 -05:00
Nick Mathewson
d9293ab3a7
Bump version in master to 0.2.5.0-alpha-dev
2013-03-01 00:13:36 -05:00
Andrea Shepard
b5a164bde4
Prefer measured bandwidths over advertised when computing things for votes on a dirauth
2013-02-27 19:43:50 -08:00
Nick Mathewson
6879910334
Fix a comment in tor_main.c
...
We don't use subversion or src/*/makefile.am any longer
2013-02-25 03:24:53 -05:00
Nick Mathewson
a4e9d67292
Remove some functions which were unused except for their tests
2013-02-23 23:38:43 -05:00
Nick Mathewson
5bfa373eee
Remove some totally unused functions
2013-02-23 23:31:31 -05:00
Nick Mathewson
365e302f61
Remove a bunch of unused macro definitions
2013-02-23 23:05:25 -05:00
Nick Mathewson
9f044eac77
Refactor format_networkstatus_vote to avoid preallocating a buffer.
...
This saves a lot of "are we about to overrun the buffer?" checking,
and unmoots a bunch of "did we allocate enough" discussion.
2013-02-20 00:36:59 -05:00
Nick Mathewson
7bb51fdd89
Rename circuit_expire_all_dirty_circs
...
The new name is circuit_mark_all_dirty_circs_as_unusable.
This resolves an XXX024
2013-02-19 18:37:03 -05:00
Nick Mathewson
62fb209d83
Stop frobbing timestamp_dirty as our sole means to mark circuits unusable
...
In a number of places, we decrement timestamp_dirty by
MaxCircuitDirtiness in order to mark a stream as "unusable for any
new connections.
This pattern sucks for a few reasons:
* It is nonobvious.
* It is error-prone: decrementing 0 can be a bad choice indeed.
* It really wants to have a function.
It can also introduce bugs if the system time jumps backwards, or if
MaxCircuitDirtiness is increased.
So in this patch, I add an unusable_for_new_conns flag to
origin_circuit_t, make it get checked everywhere it should (I looked
for things that tested timestamp_dirty), and add a new function to
frob it.
For now, the new function does still frob timestamp_dirty (after
checking for underflow and whatnot), in case I missed any cases that
should be checking unusable_for_new_conns.
Fixes bug 6174. We first used this pattern in 516ef41ac1
,
which I think was in 0.0.2pre26 (but it could have been 0.0.2pre27).
2013-02-19 18:29:17 -05:00
Nick Mathewson
3dc52e6636
Add src/or/micro-revision.i to CLEANFILES in case anybody has one
...
Fix for 7143.
2013-02-19 17:53:38 -05:00
Nick Mathewson
1827be0bd6
Make a parse_config_line_from_str variant that gives error messages
...
Without this patch, there's no way to know what went wrong when we
fail to parse a torrc line entirely (that is, we can't turn it into
a K,V pair.) This patch introduces a new function that yields an
error message on failure, so we can at least tell the user what to
look for in their nonfunctional torrc.
(Actually, it's the same function as before with a new name:
parse_config_line_from_str is now a wrapper macro that the unit
tests use.)
Fixes bug 7950; fix on 0.2.0.16-alpha (58de695f90
) which first
introduced the possibility of a torrc value not parsing correctly.
2013-02-19 17:36:17 -05:00
Nick Mathewson
5d2b2b9ede
Clear up a comment about when an assertion could fire
...
Resolves ticket 6164
2013-02-19 16:23:58 -05:00
Nick Mathewson
337e32f5b8
fix a wide line
2013-02-19 15:08:54 -05:00
Nick Mathewson
8ddf4e218e
Merge branch 'bug8065_v2'
2013-02-19 15:02:22 -05:00
Nick Mathewson
3340d3279d
Downgrade an assert to LD_BUG
...
This should prevent crashes on further recurrence of 8065, and help
diagnose such if they occur
2013-02-19 15:02:08 -05:00
Nick Mathewson
804be10b09
Fix a may-be-used-uninitialized warning.
2013-02-19 15:00:08 -05:00
Nick Mathewson
b0b0d6af63
Merge branch 'bug2286_unit_test_squashed'
2013-02-19 14:54:05 -05:00
Andrea Shepard
699c39dada
Test alternate values of maxunmeasuredbw too
2013-02-19 14:53:31 -05:00
Andrea Shepard
f445aae2e3
Update unmeasured bandwidth clipping unit test per NickM's bugfix for the Unmeasured=1 issue
2013-02-19 11:06:24 -05:00
Nick Mathewson
6170bc5a93
Refactor storing of measured_bw versus Unmeasured=1.
...
This patch moves the measured_bw field and the has_measured_bw field
into vote_routerstatus_t, since only votes have 'Measured=XX' set on
their weight line.
I also added a new bw_is_unmeasured flag to routerstatus_t to
represent the Unmeasured=1 flag on a w line. Previously, I was using
has_measured_bw for this, which was quite incorrect: has_measured_bw
means that the measured_bw field is set, and it's probably a mistake
to have it serve double duty as meaning that 'baandwidth' represents a
measured value.
While making this change,I also found a harmless but stupid bug in
dirserv_read_measured_bandwidths: It assumes that it's getting a
smartlist of routerstatus_t, when really it's getting a smartlist of
vote_routerstatus_t. C's struct layout rules mean that we could never
actually get an error because of that, but it's still quite incorrect.
I fixed that, and in the process needed to add two more sorting and
searching helpers.
Finally, I made the Unmeasured=1 flag get parsed. We don't use it for
anything yet, but someday we might.
This isn't complete yet -- the new 2286 unit test doesn't build.
2013-02-19 11:06:24 -05:00
Andrea Shepard
4c45b3d845
Add unit test for unmeasured bandwidth clipping in consensus
2013-02-19 11:06:24 -05:00
Andrea Shepard
f4d5ca9b5e
Refactor v3_networkstatus test to allow reuse of test for measuredbw
2013-02-19 11:06:24 -05:00
Nick Mathewson
869826581d
Note some annoyinc copy-and-paste code
2013-02-19 11:06:23 -05:00
Nick Mathewson
e73bbea262
Tweak consensus method 17 based on arma's comments
...
Instead of capping whenever a router has fewer than 3 measurements,
we cap whenever a router has fewer than 3 measurements *AND* there
are at least 3 authorities publishing measured bandwidths.
We also generate bandwidth lines with a new "Unmeasured=1" flag,
meaning that we didn't have enough observations for a node to use
measured bandwidth values in the authority's input, whether we capped
it or not.
2013-02-19 11:05:15 -05:00
Roger Dingledine
f2199763cf
touchups on 78582760
2013-02-19 04:07:36 -05:00
Nick Mathewson
7858276066
Revise some comments in router.c
...
Avoid the phrase "legally valid" (as opposed to valid but not legal)?
And document what functions really do.
Fix for bug 6935.
2013-02-19 02:43:36 -05:00
Nick Mathewson
22804c0391
Check for CPUs more accurartely when ONLN != CONF.
...
There are two ways to use sysconf to ask about the number of
CPUs. When we're on a VM, we would sometimes get it wrong by asking
for the number of total CPUs (say, 64) when we should have been asking
for the number of CPUs online (say, 1 or 2).
Fix for bug 8002.
2013-02-19 02:34:36 -05:00
Nick Mathewson
59fc77e29b
Fix a bug that roger found in the wide_circ_id code
2013-02-15 18:20:46 -05:00
Nick Mathewson
e6e929f5cf
Merge remote-tracking branch 'public/bug8209'
2013-02-15 16:37:53 -05:00
Nick Mathewson
73182e3220
Merge remote-tracking branch 'public/bug8207'
2013-02-15 16:29:43 -05:00
Nick Mathewson
d6634001c9
Merge remote-tracking branch 'public/wide_circ_ids'
...
Conflicts:
src/or/channel.h
src/or/connection_or.c
src/or/cpuworker.c
2013-02-15 16:23:43 -05:00
Nick Mathewson
5fcc5dfa77
make check-spaces
2013-02-15 16:02:57 -05:00
Nick Mathewson
0fa362cafa
Merge remote-tracking branch 'public/feature4994-rebased'
2013-02-15 15:58:54 -05:00
Nick Mathewson
6c8b6e9e78
Fix unreachable use-before-assign in test_util_join_win_cmdline
...
Apparently there is a compiler that believes this is something to
warn about.
2013-02-15 15:57:47 -05:00
Nick Mathewson
b90f9ebbb2
Merge remote-tracking branch 'public/integers_donna'
2013-02-15 15:55:36 -05:00
Roger Dingledine
5d400b5f7f
Authorities were adding downtime for every relay every restart
...
Stop marking every relay as having been down for one hour every
time we restart a directory authority. These artificial downtimes
were messing with our Stable and Guard flag calculations.
Fixes bug 8218 (introduced by the fix for 1035). Bugfix on 0.2.2.23-alpha.
2013-02-14 17:02:22 -05:00
Nick Mathewson
4beee0f69b
Use torint.h in curve25519-donna*.c
...
This will get it building on systems that lack stdint.h
2013-02-14 15:34:38 -05:00
Nick Mathewson
41e0f7146a
Merge remote-tracking branch 'arma/bug1992'
2013-02-14 14:55:49 -05:00
Nick Mathewson
1070a720ad
Be more robust when excluding existing nodes as new dirguards
...
In addition to rejecting them post-hoc, avoid picking them in the
first place. This makes us less likely to decide that we can't add
guards at all.
2013-02-14 12:06:59 -05:00
Nick Mathewson
91027218e2
Add some code to bluntly prevent duplicate guards from getting added
...
Apparently something in the directory guard code made it possible
for the same node to get added as a guard over and over when there
were no actual running guard nodes.
2013-02-14 11:48:47 -05:00
Nick Mathewson
d7089ff228
Restore the entry/dirguard distinction.
...
We shouldn't be calling choose_random_entry() for directory
conncetions; that's what choose_random_dirguard() is for.
2013-02-12 16:23:12 -05:00
Nick Mathewson
5e0ce4c578
oops; add a missing semicolon
...
(Cherry-picked from fc35ee4910
)
2013-02-12 10:51:20 -05:00
Roger Dingledine
178599f026
get rid of the new caching notion in resolve_my_address()
...
and replace it with the good old-fashioned two functions approach
2013-02-12 04:25:42 -05:00
Roger Dingledine
b166e9edb9
simplify timing checks
...
now that both timers are on the same schedule, there's no point
tracking separate timers.
2013-02-11 22:07:19 -05:00
Roger Dingledine
5911fc0c17
Check for IP address change every minute, not 15 minutes
...
Relays used to check every 10 to 60 seconds, as an accidental side effect
of calling directory_fetches_from_authorities() when considering doing
a directory fetch. The fix for bug 1992 removes that side effect. At the
same time, bridge relays never had the side effect, leading to confused
bridge operators who tried crazy tricks to get their bridges to notice
IP address changes (see ticket 1913).
The new behavior is to reinstate an every-60-seconds check for both
public relays and bridge relays, now that the side effect is gone.
2013-02-11 21:57:32 -05:00
Roger Dingledine
17089302fd
Stop trying to resolve our hostname so often
...
For example, we were doing a resolve every time we think about doing a
directory fetch. Now we reuse the cached answer in some cases.
Fixes bugs 1992 (bugfix on 0.2.0.20-rc) and 2410 (bugfix on
0.1.2.2-alpha).
2013-02-11 21:48:18 -05:00
George Kadianakis
9bdd33eae6
Add parse_bridge_line() unittests.
2013-02-11 23:45:18 +01:00
Nick Mathewson
e5a987fbb8
Don't tor_close_socket(-1) in tor-resolve.
...
Bugfix on 96b1bd4fb8
. Not in any released Tor.
2013-02-11 17:32:58 -05:00
Roger Dingledine
cc896f7c84
Teach resolve_my_address() to return a cached answer
...
I didn't make any of the callers use this feature yet.
2013-02-11 17:09:10 -05:00
Nick Mathewson
99457ee776
Fix two more coverity-spotted leaks in master.
...
One is a probably-impossible leak if we fail to sign a consensus;
another occurs when we can't look up the user we're trying to chown
our sockets to.
2013-02-11 17:01:02 -05:00
Nick Mathewson
f3835bcb37
Avoid null-pointer deref in pathbias_is_new_circ_attempt
...
Coverity is worried about this (CID 980653). It hasn't happened in
testing, but we might as well make sure it can't happen.
2013-02-11 16:59:21 -05:00
Nick Mathewson
719940df2b
Fix a nigh-impossible overflow in cpuworker.c
...
When we compute the estimated microseconds we need to handle our
pending onionskins, we could (in principle) overflow a uint32_t if
we ever had 4 million pending onionskins before we had any data
about how onionskins take. Nevertheless, let's compute it properly.
Fixes bug 8210; bugfix on 0.2.4.10. Found by coverity; this is CID
980651.
2013-02-11 16:46:38 -05:00
Nick Mathewson
9b2bb901d7
Fix a null-deref-on-fail in unit tests
...
If geoip_format_bridge_stats() returned NULL when it should have
returned a string, we would have tried to deref NULL, and died. Not
a big deal in the unit tests, but still worth fixing.
Found by coverity; This is CID 743384.
2013-02-11 16:32:13 -05:00
Nick Mathewson
da6720e9fa
Make _SC_OPEN_MAX actually get used when closing fds before exec.
...
Fixes bug 8209; bugfix on 0.2.3.1-alpha.
2013-02-11 16:27:35 -05:00
Nick Mathewson
fc35ee4910
oops; add a missing semicolon
2013-02-11 16:17:33 -05:00
Nick Mathewson
5f29bc71b3
Merge remote-tracking branch 'public/bug7816_023'
2013-02-11 16:14:17 -05:00
Nick Mathewson
afca9ab14e
Fix another memory leak
...
This one occurs when changing configuration options. Found by
coverity.
2013-02-11 16:13:52 -05:00
Nick Mathewson
fd8ef8dc57
Merge remote-tracking branch 'public/bug8208'
2013-02-11 16:06:02 -05:00
Nick Mathewson
e3578d52e4
Check whether ei is non-NULL before altering it.
...
This fixes a crash bug if we fail to generate an extrainfo
descriptor.
Fixes bug 8208; bugfix on 0.2.3.16-alpha.
2013-02-11 16:05:03 -05:00
Nick Mathewson
43d2f99d54
Suppress a coverity false positive in connection_edge_package_raw_inbuf
...
Coverity is worried that we're checking entry_conn in some cases,
but not in the case where we set entry_conn->pending_optimistic_data.
This commit should calm it down (CID 718623).
2013-02-11 15:55:50 -05:00
Nick Mathewson
f12fafac5a
Make hidden service authorization work again.
...
The refactoring in commit 471ab34032
wasn't complete enough: we
were checking the auth_len variable, but never actually setting it,
so it would never seem that authentication had been provided.
This commit also removes a bunch of unused variables from
rend_service_introduce, whose unusedness we hadn't noticed because
we were wiping them at the end of the function.
Fix for bug 8207; bugfix on 0.2.4.1-alpha.
2013-02-11 15:42:57 -05:00
Nick Mathewson
52263b0dda
Fix even more dead code and resource leaks in the unit tests
...
Found by coverity
2013-02-11 15:20:20 -05:00
Nick Mathewson
96b1bd4fb8
Fix a very short-lived socket leak in tor-resolve
...
This shouldn't actually matter, since tor-resolve will return soon
after this function exits, but it's nice to be warning-free
Found by coverity, fixes CID 718633
2013-02-11 15:13:42 -05:00
Nick Mathewson
717946089b
Resolve memory leaks in the unit tests and benchmarks (found by coverity)
...
These shouldn't really matter, but it's nice to be leak-free.
2013-02-11 14:57:10 -05:00
Nick Mathewson
b9432becbe
Fix a copy-and-paste issue found by coverity
...
Fixes CID 980650; bugfix on 0.2.4.10-alpha.
2013-02-11 14:42:33 -05:00
Nick Mathewson
ffd6e557cb
Speed up the curve25519 unit test by doing fewer iterations
...
This test was accounting for about 2/3 of our unit tests' runtime,
even on systems with a fast curve25519. No test should take so long.
2013-02-11 13:55:42 -05:00
Nick Mathewson
01184f164f
Merge remote-tracking branch 'public/bug8158'
2013-02-11 13:32:38 -05:00
Nick Mathewson
36e2eb6775
Avoid generating extra spaces when explaining how we guessed our address
2013-02-11 13:29:56 -05:00
Roger Dingledine
92ea0b86de
Refactor resolve_my_address() so logs are more accurate / helpful
...
It returns the method by which we decided our public IP address
(explicitly configured, resolved from explicit hostname, guessed from
interfaces, learned by gethostname).
Now we can provide more helpful log messages when a relay guesses its IP
address incorrectly (e.g. due to unexpected lines in /etc/hosts). Resolves
ticket 2267.
While we're at it, stop sending a stray "(null)" in some cases for the
server status "EXTERNAL_ADDRESS" controller event. Resolves bug 8200.
2013-02-11 13:29:56 -05:00
Roger Dingledine
dfbb12cabf
log the hostname that resolve_my_address() used to guess our IP
2013-02-11 13:29:56 -05:00