Nick Mathewson
11edbf4808
Merge branch 'maint-0.2.6' into maint-0.2.7
2016-09-07 13:54:03 -04:00
Nick Mathewson
52a99cb6c1
Merge branch 'maint-0.2.5' into maint-0.2.6
2016-09-07 13:53:53 -04:00
Nick Mathewson
e4d82da05b
Merge branch 'maint-0.2.4' into maint-0.2.5
2016-09-07 13:53:43 -04:00
Nick Mathewson
9d933bbacf
Capture and enforce BUG warnings in dir/param_voting_lookup
2016-09-07 13:49:18 -04:00
Nick Mathewson
075c52084d
Fix unit test failure introduced by #20002
...
Updating the consensus algorithm made a non-valid node never get
listed, which messed up some other tests.
2016-09-07 13:40:38 -04:00
Nick Mathewson
a49fee1c29
Capture and enforce bug warnings in util/time test
2016-09-07 12:15:46 -04:00
Nick Mathewson
e9b1d0619f
Merge remote-tracking branch 'dgoulet/ticket18693_029_01'
2016-09-07 11:46:00 -04:00
Nick Mathewson
2a3b651790
Merge remote-tracking branch 'sebastian/bug20064'
2016-09-07 11:38:43 -04:00
Karsten Loesing
56f95ba94d
Update geoip and geoip6 to the September 6 2016 database.
2016-09-07 11:08:04 +02:00
Nick Mathewson
3823d0aa7d
Capture and detect the BUG() warnings in test_util_parse_integer.
2016-09-06 21:01:52 -04:00
Nick Mathewson
d09723ad19
Add facility to suppress/capture tor_bug_occurred_() messages in unit tests.
2016-09-06 21:01:17 -04:00
Nick Mathewson
2b39c927c7
Add !(...) to BUG() log messages
...
They use the same code as reporting assertion failures, so we should
invert the sense of what we're "asserting".
Fixes bug 20093.
2016-09-06 21:00:51 -04:00
Nick Mathewson
2a4a815f58
Fix a unit test bug for passing arguments to tor_parse_ulong.
...
We wanted to make sure -50 was a bad input, but instead we were
passing a 'min' that was greater than 'max'.
2016-09-06 20:29:55 -04:00
Nick Mathewson
7ba47ca1fd
Split tor_parse_{some_int} testing into separate fn. Code movement only.
2016-09-06 20:25:54 -04:00
Nick Mathewson
af58a89b86
Merge remote-tracking branch 'teor/bug20012'
2016-09-06 19:14:02 -04:00
Nick Mathewson
43092e21c1
Merge remote-tracking branch 'teor/feature20069'
2016-09-06 19:06:32 -04:00
Nick Mathewson
128f7ffbc0
Merge remote-tracking branch 'public/ticket20002'
2016-09-06 14:27:13 -04:00
Nick Mathewson
5927ed8d33
checkSpace.pl now forbids more identifiers.
...
The functions it warns about are:
assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc,
strdup, strndup, calloc.
Also, fix a few lingering instances of these in the code. Use other
conventions to indicate _intended_ use of assert and
malloc/realloc/etc.
2016-09-06 12:35:37 -04:00
Nick Mathewson
440228907d
Merge remote-tracking branch 'sebastian/bug20065'
2016-09-06 10:12:42 -04:00
teor
55a2bfb056
Fix an indentation issue in rend_config_services
2016-09-06 17:49:52 +10:00
teor (Tim Wilson-Brown)
41ad244dd6
Fix a comment typo in smartlist_get_most_frequent_()
2016-09-06 17:49:44 +10:00
teor
26b47f80dd
Add hs-ipv6 to the chutney IPv6 tests
...
Requires a recent version of chutney.
Also remove bridges+hs, as it's somewhat redundant.
2016-09-06 13:45:09 +10:00
Sebastian Hahn
74d710e7dc
Give useful error if authority_signing_key doesn't exist
2016-09-06 00:14:20 +02:00
Sebastian Hahn
0d485fcfef
Vote Exit correctly with DirAllowPrivateAddresses set
...
When allowing private addresses, mark Exits that only exit to private
locations as such. Fixes bug 20064; bugfix on 0.2.2.9-alpha.
2016-09-05 23:39:47 +02:00
Nick Mathewson
b9a43c8f43
For me, asan/ubsan require more syscalls.
...
Permit sched_yield() and sigaltstack() in the sandbox.
Closes ticket 20063
2016-09-05 14:25:58 -04:00
Nick Mathewson
c2d1356739
Change servers to never pick 3DES.
...
Closes ticket 19998.
2016-09-05 14:09:14 -04:00
Andrea Shepard
341a159ab4
Appease make check-spaces
2016-09-05 17:47:39 +00:00
Nick Mathewson
6abce601f2
Fix BUG warning with stack trace from config/parse_port_config__listenaddress
2016-09-05 13:30:50 -04:00
Nick Mathewson
6c1d1127a8
Fix memory leaks in the shared random tests.
...
Please remember to test your code with
--enable-expensive-hardening. :)
2016-09-01 09:10:27 -04:00
Nick Mathewson
7ef4eef764
Actually, always monotime_init() in the unit tests.
2016-08-31 14:38:17 -04:00
Nick Mathewson
cfc62e2374
Initialize monotonic timer code before using it in the tests
2016-08-31 14:34:49 -04:00
Nick Mathewson
251b348d7b
It is not a bug to attempt to base32_decode a non-base32 string
...
(Rationale: it isn't a bug to try this for a base16 or base64
string. It's just a bad input that we're detecting.)
2016-08-31 14:31:00 -04:00
Nick Mathewson
d4f05dcd0e
Detect and suppress bug message from zlib compression bomb test
2016-08-31 14:30:34 -04:00
Nick Mathewson
d299c043d4
Require specific messages for remaining link-handshake failure cases
2016-08-31 14:10:15 -04:00
Nick Mathewson
273290d4fe
Always log [bug] warnings from the unit tests.
...
We should consider them bugs. If they are happening intentionally,
we should use the log_test_helpers code to capture and suppress
them. But having them off-by-default has potential to cause
programming errors.
2016-08-31 13:22:07 -04:00
Nick Mathewson
69dce09031
Do not call tor_tls_server_info_callback(NULL) from tests.
...
This isn't valid behavior, and it causes a crash when you run
the unit tests at --debug.
I've added an IF_BUG_ONCE() check for this case.
2016-08-31 13:18:13 -04:00
Nick Mathewson
871b711f10
Work even harder not to suppress logging messages unless we mean to.
2016-08-31 13:12:36 -04:00
Nick Mathewson
2df6cdc9f9
Document and clean log_test_helpers.c a bit
...
In addition to documentation, this commit makes a function static,
and removes a weird single-point-of-return-ism, and notes a thing I
should fix.
2016-08-31 13:11:26 -04:00
Nick Mathewson
d5614b2102
Use setup_full_capture_of_logs() where appropriate.
2016-08-31 12:53:18 -04:00
Nick Mathewson
f74916a98f
setup_capture_of_logs: no longer suppress log messages
...
Previously setup_capture_of_logs would prevent log messages from
going to the console entirely. That's a problem, since sometimes
log messages are bugs! Now setup_capture_of_logs() acts sensibly.
If you really do need to keep a message from going to the console
entirely, there is setup_full_capture_of_logs(). But only use that
if you're prepared to make sure that there are no extraneous
messages generated at all.
2016-08-31 12:51:22 -04:00
Nick Mathewson
1f7dc823c5
Improvements to test_link_handshake: check specific error messages
...
Otherwise it's too easy to lose our test coverage.
2016-08-31 12:11:01 -04:00
Nick Mathewson
26a63a9303
Fix all "BUG" warnings created from link-handshake tests.
2016-08-31 11:37:18 -04:00
Nick Mathewson
14c07f3f21
Another log testing helper helper, for matching partial strings.
2016-08-31 11:35:12 -04:00
Nick Mathewson
bbac9e1d0c
Don't warn on unlink(bw_accounting) when errno == ENOENT
...
Patch from pastly; fixes bug 19964.
2016-08-31 10:57:09 -04:00
Nick Mathewson
c15b99e6e9
Fix a deref-before-null-check complaint
...
Found by coverity scan; this is CID 1372329.
Also, reindent some oddly indented code.
2016-08-31 10:32:10 -04:00
teor
0a3009bb85
Stop inadvertently upgrading client intro connections to ntor
...
Also stop logging the intro point details on error by default.
Fixes #20012 , introduced with ntor in tor 0.2.4.8-alpha.
2016-08-31 15:10:58 +10:00
teor (Tim Wilson-Brown)
16386a8cd1
Count unix sockets when counting client listeners
...
Users can't run an anonymous client and non-anonymous single
onion service at the same time. We need to know whether we have
any client ports or sockets open to do this check.
When determining whether a client port (SOCKS, Trans, NATD, DNS)
is set, count unix sockets when counting client listeners. This
has no user-visible behaviour change, because these options are
set once and never read in the current tor codebase.
Don't count sockets when setting ControlPort_set, that's what
ControlSocket is for. (This will be reviewed in #19665.)
Don't count sockets when counting server listeners, because the code
that uses these options expects to count externally-visible ports.
(And it would change the behaviour of Tor.)
2016-08-31 13:41:31 +10:00
Nick Mathewson
e3bf8854c8
We no longer need to tag UseNTorHandshake as deprecated, since it is obsolete
2016-08-29 15:03:55 -04:00
Nick Mathewson
bbaa7d09a0
Merge remote-tracking branch 'teor/reject-tap-v6'
2016-08-29 15:02:11 -04:00
David Goulet
f46ce6e3d8
test: Fix shared random unit test for big endian
...
Copying the integer 42 in a char buffer has a different representation
depending on the endianess of the system thus that unit test was failing on
big endian system.
This commit introduces a python script, like the one we have for SRV, that
computes a COMMIT/REVEAL from scratch so we can use it as a test vector for
our encoding unit tests.
With this, we use a random value of bytes instead of a number fixing the
endianess issue and making the whole test case more solid with an external
tool that builds the COMMIT and REVEAL according to the spec.
Fixes #19977
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-08-26 14:46:29 -04:00
Nick Mathewson
9b9fb63276
prop272: When voting, include no non-Valid relays in consensus
...
Implements ticket 20002, and part of proposal 272.
2016-08-26 14:14:34 -04:00
Andrea Shepard
33a3e6f718
Avoid asserts in oos/kill_conn_list unit test
2016-08-26 00:02:00 +00:00
Andrea Shepard
32fbc9738a
Fix OOS comparator fix
2016-08-26 00:01:25 +00:00
David Goulet
9e1cb3660b
Fix duplicated if condition in connection.c
...
Furthermore, fix a test that could returned an uninitialized value.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-08-25 14:52:28 -04:00
Nick Mathewson
1dfa2213a4
Merge remote-tracking branch 'andrea/ticket18640_v3'
2016-08-25 14:29:06 -04:00
Nick Mathewson
e9124b8cc7
bump to 0.2.8.7-dev
2016-08-24 14:46:08 -04:00
Nick Mathewson
7be7f42d45
bump to 0.2.9.2-alpha-dev
2016-08-24 14:45:33 -04:00
teor (Tim Wilson-Brown)
382a28951f
Check onion hostnames against client port flags
...
Check NoOnionTraffic before attaching a stream.
NoOnionTraffic refuses connections to all onion hostnames,
but permits non-onion hostnames and IP addresses.
2016-08-24 14:40:54 -04:00
teor (Tim Wilson-Brown)
b311f82026
Check non-onion hostnames & IP addresses against client port flags
...
Check NoDNSRequest, NoIPv4Traffic, and NoIPv6Traffic before
attaching a stream.
NoDNSRequest refuses connections to all non-onion hostnames,
but permits IP addresses.
NoIPv4Traffic refuses connections to IPv4 addresses, but resolves
hostnames.
NoIPv6Traffic refuses connections to IPv6 addresses, but resolves
hostnames.
Combined, they refuse all non-onion hostnames and IP addresses.
2016-08-24 14:40:54 -04:00
teor (Tim Wilson-Brown)
45b4e63519
Make Tor2Web error message clearer
...
Tor2Web refuses non-onion hostnames and IP addresses.
2016-08-24 14:40:54 -04:00
teor (Tim Wilson-Brown)
f41ddbecc6
Comment-only punctuation fix
2016-08-24 14:40:53 -04:00
teor (Tim Wilson-Brown)
ce747f01aa
Make port names and types consistent in the port unit tests
...
String constant changes only, and only in the unit tests.
These strings are used in log messages only.
2016-08-24 14:40:53 -04:00
teor (Tim Wilson-Brown)
41cc1f612b
Parse *Port flags NoDNSRequest, NoOnionTraffic & OnionTrafficOnly
...
OnionTrafficOnly is equivalent to NoDNSRequest, NoIPv4Traffic,
and NoIPv6Traffic.
Add unit tests for parsing and checking option validity.
Add documentation for each flag to the man page.
Add changes file for all of #18693 .
Parsing only: the flags do not change client behaviour (yet!)
2016-08-24 14:40:53 -04:00
Nick Mathewson
10f8607125
make check-spaces fixes
2016-08-24 13:39:22 -04:00
Nick Mathewson
57ba7ab39a
Bump to 0.2.8.7
2016-08-24 11:01:57 -04:00
Nick Mathewson
e2ede7c9d5
Bump to 0.2.9.2-alpha
2016-08-24 11:01:33 -04:00
Nick Mathewson
5132905419
Merge branch 'maint-0.2.8'
2016-08-24 10:45:11 -04:00
teor
b1ad024d30
Fix path selection on firewalled clients
...
Signed-off-by: teor <teor2345@gmail.com>
2016-08-24 10:07:47 -04:00
Nick Mathewson
297635f806
Merge branch 'maint-0.2.8'
2016-08-24 10:03:19 -04:00
Nick Mathewson
d3a975ea05
Merge branch 'maint-0.2.7' into maint-0.2.8
2016-08-24 10:02:52 -04:00
Isis Lovecruft
41ab23bed5
Replace Tonga with Bifroest.
...
* FIXES #19728 : https://bugs.torproject.org/19728
* CLOSES #19690 : https://bugs.torproject.org/19690
2016-08-24 10:01:23 -04:00
teor
19816f2f78
Add a stub for rend_service_allow_direct_connection
...
It always returns 0. It should be replaced with the Single
Onion version from #17178 when both are merged.
2016-08-24 11:02:19 +10:00
teor (Tim Wilson-Brown)
10aa913acc
Client & HS ignore UseNTorHandshake, all non-HS handshakes use ntor
...
Rely on onion_populate_cpath to check that we're only using
TAP for the rare hidden service cases.
Check and log if handshakes only support TAP when they should support
ntor.
2016-08-24 11:02:00 +10:00
teor (Tim Wilson-Brown)
cad9046632
Improve comments in circuit_get_cpath_*
2016-08-24 10:32:22 +10:00
teor (Tim Wilson-Brown)
febd4ab0e5
Client & HS make sure every hop in every non-HS path supports ntor
...
When a client connects to an intro point not in the client's consensus,
or a hidden service connects to a rend point not in the hidden service's
consensus, we are stuck with using TAP, because there is no ntor link
specifier.
2016-08-24 10:32:10 +10:00
Nick Mathewson
40d05983c4
Fix some comments in sandbox.c
...
Closes ticket 19942; patch from "cypherpunks"
2016-08-23 10:02:11 -04:00
Nick Mathewson
a0398dd348
Merge remote-tracking branch 'jigsaw/fix-17758'
2016-08-23 09:57:14 -04:00
Nick Mathewson
ff65618f16
Merge remote-tracking branch 'jigsaw/fix-15381'
2016-08-23 09:55:37 -04:00
Nick Mathewson
e8d7953c61
Use tor_assert, not assert.
2016-08-23 09:24:20 -04:00
Nick Mathewson
bd45f7c668
Merge branch 'bug13953_squashed'
2016-08-23 09:22:04 -04:00
teor
a60ef72345
Reword the router_check_descriptor_address_port_consistency log message
...
The new message covers static and dynamic public IPv4 addresses,
and external / internal addresses in NAT setups.
2016-08-23 09:16:08 -04:00
Nick Mathewson
a3d419634b
Merge remote-tracking branch 'asn/bug19872_v2'
2016-08-23 08:50:32 -04:00
George Kadianakis
b8bfdf638e
Introduce ed25519_{sign,checksig}_prefixed functions().
2016-08-23 14:53:01 +03:00
Nick Mathewson
62b239dd9c
Merge branch 'maint-0.2.8'
2016-08-22 10:19:15 -04:00
Nick Mathewson
0ba05313d5
Do not pass NULL to log(%s) in dir_server_new.
...
This bug had existed since 0.2.4.7-alpha, but now that we have
FallbackDirs by default, it actually matters.
Fixes bug 19947; bugfix on 0.2.4.7-alpha or maybe 0.2.8.1-alpha.
Rubiate wrote the patch; teor wrote the changes file.
2016-08-22 01:22:19 -04:00
Andrea Shepard
9a09513c0b
Use connection_mark_for_close() rather than connection_mark_on_flush() on OOS
2016-08-20 04:43:01 +00:00
Andrea Shepard
31028af440
Add DisableOOSCheck option, on by default until we have better heuristics
2016-08-20 04:36:37 +00:00
Andrea Shepard
3efe92ba58
Consider the case that a connection doesn't have a valid socket during OOS
2016-08-20 03:57:32 +00:00
Andrea Shepard
1a7709d409
Add connection_is_moribund() inline
2016-08-20 03:34:16 +00:00
Andrea Shepard
a403230fe3
Use SMARTLIST_FOREACH in connection_count_moribund() per code review
2016-08-20 03:12:58 +00:00
Andrea Shepard
dbdac1dc27
s/connection_handle_oos/connection_check_oos/g per code review
2016-08-20 02:44:33 +00:00
Andrea Shepard
d65f030915
Unit test for pick_oos_victims()
2016-08-20 01:43:52 +00:00
Andrea Shepard
e17083b432
Unit test for kill_conn_list_for_oos()
2016-08-20 01:43:52 +00:00
Andrea Shepard
26c2ded00c
Unit test for connection_handle_oos()
2016-08-20 01:43:51 +00:00
Andrea Shepard
709f2cbf58
Implement OOS comparator
2016-08-20 01:43:51 +00:00
Andrea Shepard
d502efbd47
Implement pick_oos_victims() except for sort step
2016-08-20 01:43:51 +00:00
Andrea Shepard
e9464737af
Implement kill_conn_list_for_oos()
2016-08-20 01:43:50 +00:00
Andrea Shepard
c76d45bdec
Stub out pick_oos_victims() and kill_conn_list_for_oos()
2016-08-20 01:43:50 +00:00
Andrea Shepard
2bc19171ef
Implement connection_count_moribund() for OOS handler
2016-08-20 01:43:50 +00:00
Andrea Shepard
4f253d4c67
Don't say OOS unless the ConnLimit thresholds have been set
2016-08-20 01:43:49 +00:00
Andrea Shepard
34d9d02150
Stub out connection_handle_oos() and call it from places we can change the socket count or thresholds
2016-08-20 01:43:46 +00:00
Andrea Shepard
1c0c0022d8
Compute thresholds for OOS from ConnLimit_ when setting options
2016-08-20 01:42:30 +00:00
Nick Mathewson
3c8baa77a1
Log a warning when Testing options are deprecated.
2016-08-19 20:21:04 -04:00
Nick Mathewson
05ad2db283
Add comments to explain when things were deprecated
2016-08-19 20:09:51 -04:00
Nick Mathewson
507f07de09
Merge remote-tracking branch 'public/deprecation_v2'
2016-08-19 19:58:51 -04:00
Nick Mathewson
5aad921e3a
Rename free_voting_schedule to voting_schedule_free. Wrap line. Follow if convention.
2016-08-19 19:44:19 -04:00
Nick Mathewson
3e8f93bb10
Merge remote-tracking branch 'jigsaw/fix-19562'
2016-08-19 19:41:53 -04:00
Nick Mathewson
fdc2a91956
Merge remote-tracking branch 'public/bug19466'
2016-08-19 19:37:48 -04:00
Nick Mathewson
8f2f06c9b3
Merge branch 'maint-0.2.8'
2016-08-19 19:35:39 -04:00
Nick Mathewson
65cf5130ef
Merge branch 'bug19903_028_v2' into maint-0.2.8
2016-08-19 19:35:26 -04:00
Nick Mathewson
49843c980a
Avoid confusing GCC 4.2.1 by saying "int foo()... inline int foo() {...}"
...
Fixes bug 19903; bugfix on 0.2.8.1-alpha.
2016-08-19 19:34:39 -04:00
Daniel Pinto
8c0fdf6a27
Added a voting_schedule_free function to free voting schedules.
...
Existing Uses of the tor_free function on voting schedules were
replaced with voting_schedule_free.
Fixes #19562 .
2016-08-16 17:53:38 +01:00
Daniel Pinto
3d6ae798cf
Fixes inconsistent version prefix in log messages.
...
Fixes #15381 .
2016-08-16 17:22:16 +01:00
Daniel Pinto
4f19f85eda
Prevents negative number of written bytes on error message.
...
Fixes #17758 .
2016-08-16 17:12:18 +01:00
teor
4b4389280e
Check parameters to router_check_descriptor_address_port_consistency
2016-08-16 14:39:46 +10:00
teor
427663428b
Refactor duplicate code in router_check_descriptor_address_consistency
...
No behaviour change
2016-08-16 14:05:46 +10:00
s7r
4d2b3164ec
Make log message clearer
...
Longer and more explicit log message so we don't confuse users with behind NAT with working configurations and state that public IP addresses only should be provided with "Address", won't work with internal addresses.
2016-08-15 09:50:10 +00:00
Nick Mathewson
be820f41a3
Fix quite a few slow memory leaks in config.c
...
This bug was introduced in 8bbbbaf87b
when we added a separate
or_options_free() function but didn't start using it everywhere.
Fixes bug 19466.
2016-08-12 18:47:35 -04:00
Nick Mathewson
7f145b54af
Merge remote-tracking branch 'public/Fix_19450'
2016-08-12 16:11:28 -04:00
cypherpunks
8d67c079b4
Fix integer overflows in the conversion tables
2016-08-12 14:18:01 -04:00
Nick Mathewson
06e82084d6
Merge remote-tracking branch 'andrea/bug8625_prod'
2016-08-12 12:44:06 -04:00
Nick Mathewson
a7e317927b
Merge branch 'maint-0.2.8'
2016-08-12 10:27:23 -04:00
Nick Mathewson
459e5d705e
Merge branch 'maint-0.2.7' into maint-0.2.8
2016-08-12 10:27:14 -04:00
Nick Mathewson
db372addc8
Merge branch 'maint-0.2.6' into maint-0.2.7
2016-08-12 10:27:08 -04:00
Nick Mathewson
742ff2cddb
Merge branch 'maint-0.2.5' into maint-0.2.6
2016-08-12 10:27:01 -04:00
Nick Mathewson
46754d6081
Merge branch 'maint-0.2.4' into maint-0.2.5
2016-08-12 10:26:48 -04:00
Karsten Loesing
1410947351
Update geoip and geoip6 to the August 2 2016 database.
2016-08-12 11:53:38 +02:00
Nick Mathewson
e788c577f1
Only use evutil_secure_rng_add_bytes() when present.
...
OpenBSD removes this function, and now that Tor requires Libevent 2,
we should also support the OpenBSD Libevent 2.
Fixes bug 19904; bugfix on 0.2.5.4-alpha.
2016-08-11 20:37:18 -04:00
Nick Mathewson
60997a00e8
Fix a bug in the old-gcc version of ENABLE_GCC_WARNING
...
Fixes bug 19901; bugfix on 0.2.9.1-alpha.
2016-08-11 19:58:13 -04:00
Nick Mathewson
d5c47f0436
Add some how-to documentation for ht.h. Closes #19896
2016-08-11 10:18:51 -04:00
Andrea Shepard
09a0f2d0b2
Eliminate redundant hourly reset of descriptor download failures
2016-08-10 03:34:54 +00:00
Andrea Shepard
05853485a4
Debug logging for router/consensus descriptor download resets
2016-08-10 03:34:54 +00:00
Nick Mathewson
7e3e482dad
bump master to 0.2.9.1-alpha.dev
2016-08-08 14:31:30 -04:00
Nick Mathewson
f5dcab8072
Add new warn_deprecated option to config_assign*().
...
Also, collapse all the config_assign*() options into a flags
argument, since having two boolean arguments was already confusing.
2016-08-03 12:52:26 -04:00
Nick Mathewson
f3314aa6e1
Deprecate some SocksPort sub-options.
2016-08-03 12:24:07 -04:00
Nick Mathewson
9b6ff4c882
Teach checkOptionDocs about deprecation.
...
In particular, teach it that deprecated options must exist.
2016-08-03 12:16:58 -04:00
Nick Mathewson
66e610da72
Mark a big pile of options as deprecated.
2016-08-03 12:08:57 -04:00
Nick Mathewson
e6220ccbf8
Add deprecation for configuration options that need to go away.
2016-08-03 11:43:19 -04:00
Nick Mathewson
c9b8d4c086
We no longer use config_var_description_t
2016-08-03 11:19:08 -04:00
Nick Mathewson
70fd23f498
Bump master version to 0.2.9.1-alpha
2016-08-02 15:37:35 -04:00
Nick Mathewson
7b896fe61e
Remove/fix remaining evbuffer references
2016-08-02 14:02:35 -04:00
Nick Mathewson
4d4ccc505b
Search for remaining references to 'bufferevent'.
...
Remove or adjust as appropriate.
2016-08-02 13:59:47 -04:00
Nick Mathewson
46ef4487d3
Remove generic_buffer_*() functions as needless.
...
These functions were there so that we could abstract the differences
between evbuffer and buf_t. But with the bufferevent removal, this
no longer serves a purpose.
2016-08-02 13:50:00 -04:00
Nick Mathewson
cd9d39d54b
Rename generic_buffer_set_to_copy, since generic buffers are not a thing
2016-08-02 13:33:41 -04:00
Nick Mathewson
88a7a02728
Bufferevent removal: remove more bufferevent-only options
...
(All this IOCP stuff was bufferevent-only.)
2016-08-02 13:33:08 -04:00
Nick Mathewson
8fd6b0fc46
Remove USE_BUFFEREVENTS code outside src/or
2016-08-02 13:22:06 -04:00
Nick Mathewson
c68a23a135
Bufferevent removal: remove HAS_BUFFEREVENT macros and usage
...
This is another way that we had bufferevents-only code marked.
2016-08-02 13:15:10 -04:00
Nick Mathewson
8e9a6543e1
More bufferevent removal: bev_str is no longer needed in tor_init
2016-08-02 13:08:00 -04:00
Nick Mathewson
6b740aa46b
bump maint-0.2.8 to 0.2.8.6-dev
2016-08-02 11:13:44 -04:00
teor
8c2ee16b8f
Get the extend_info_from_router check the right way around
2016-08-02 14:28:56 +10:00
Nick Mathewson
11386eb6d1
bump to 0.2.8.6
2016-07-29 11:17:28 -04:00
Nick Mathewson
f3575a45ce
Merge branch 'maint-0.2.8'
2016-07-29 10:23:38 -04:00
teor (Tim Wilson-Brown)
1c4a2dd208
Remove a fallback that was on the hardcoded list, then opted-out
...
The fallback was added in 0.2.8.2-alpha.
2016-07-29 10:23:15 -04:00
Andrea Shepard
1995328a3d
Keep make check-spaces happy
2016-07-29 05:05:12 +00:00
Nick Mathewson
dffc6910b1
Three more -Wshadow fixes.
2016-07-28 11:24:03 -04:00
Nick Mathewson
25513ae174
Re-run trunnel.
2016-07-28 10:52:43 -04:00
Nick Mathewson
94bff894f9
Fix a large pile of solaris warnings for bug 19767.
...
In nearly all cases, this is a matter of making sure that we include
orconfig.h before we include any standard c headers.
2016-07-28 10:47:46 -04:00
Nick Mathewson
9fe6fea1cc
Fix a huge pile of -Wshadow warnings.
...
These appeared on some of the Jenkins platforms. Apparently some
GCCs care when you shadow globals, and some don't.
2016-07-28 10:22:10 -04:00
Nick Mathewson
0390e1a60c
Fix a set of variable-shadowing warnings in curve25519-donna.c
2016-07-28 10:03:29 -04:00
Nick Mathewson
a8676b1ede
Merge branch 'bug18902_squashed'
2016-07-28 06:59:03 -04:00
Nick Mathewson
4757303873
Fix all -Wshadow warnings on Linux
...
This is a partial fix for 18902.
2016-07-28 06:58:44 -04:00
Nick Mathewson
f0488551e7
Merge branch 'bug19639_squashed'
2016-07-26 19:31:15 -04:00
teor (Tim Wilson-Brown)
64bf6b70a8
Check that extend_info_from_router is never called on a client
2016-07-26 19:31:05 -04:00
Nick Mathewson
9de9f2d48b
Merge branch 'feature19116_squashed'
2016-07-26 19:21:04 -04:00
teor (Tim Wilson-Brown)
bf2f7c265c
We fixed #15937 , update a comment
2016-07-26 19:20:53 -04:00
teor (Tim Wilson-Brown)
64b5140256
Call chutney's test-network.sh when it is available
...
Also mark the parts of tor's test-network.sh that can be deleted
once everyone has updated to chutney's test-network.sh.
2016-07-26 19:20:53 -04:00
teor (Tim Wilson-Brown)
bb4506da6f
Add a dry run mode to test-network.sh
2016-07-26 19:20:53 -04:00
Nick Mathewson
d70fac15ff
Merge remote-tracking branch 'teor/bug19702'
2016-07-26 19:12:23 -04:00
Nick Mathewson
d97fca16d0
Fix an integer overflow related to monotonic time on windows.
...
To maintain precision, to get nanoseconds, we were multiplying our
tick count by a billion, then dividing by ticks-per-second. But
that apparently isn't such a great idea, since ticks-per-second is
sometimes a billion on its own, so our intermediate result was
giving us attoseconds.
When you're counting in attoseconds, you can only fit about 9
seconds into an int64_t, which is not so great for our purposes.
Instead, we now simplify the 1000000000/1000000000 fraction before
we start messing with nanoseconds. This has potential to mess us
up if some future MS version declares that performance counters will
use 1,000,000,007 units per second, but let's burn that bridge when
we come to it.
2016-07-26 11:23:58 -04:00
Nick Mathewson
09c25697d7
Add a function to simplify a fraction.
...
Apparently remembering euclid's algorithm does pay off sooner or later.
2016-07-26 11:23:34 -04:00
Nick Mathewson
90ca446048
Remove windows debugging prints: it was an integer overflow hitting ftrapv
2016-07-26 11:07:53 -04:00
Nick Mathewson
019b7ddb9f
fix identifier mistake :(
2016-07-26 10:44:51 -04:00
Nick Mathewson
160d2c6aab
Redux^3: Temporarily add windows verbosity to track down jenkins failures
2016-07-26 10:36:44 -04:00
Nick Mathewson
0cef69713c
Redux^2: Temporarily add windows verbosity to track down jenkins failures
2016-07-26 10:04:40 -04:00
Nick Mathewson
fb7f90c181
Tweaks on 19435 fix:
...
* Raise limit: 16k isn't all that high.
* Don't log when limit exceded; log later on.
* Say "over" when we log more than we say we log.
* Add target version to changes file
2016-07-26 09:59:48 -04:00
Ivan Markin
77459b97aa
Fix integer overflow in the rate-limiter ( #19435 ).
2016-07-26 09:49:40 -04:00
Nick Mathewson
264fb7eb82
debugging: print ticks-per-second on windows. is it 0?
2016-07-26 09:44:41 -04:00
Nick Mathewson
e77c23e455
Redux: Temporarily add windows verbosity to track down jenkins failures
2016-07-26 09:24:53 -04:00
Nick Mathewson
1033713c9c
Temporarily add some windows verbosity to track down unit test failure on jenkins.
2016-07-26 08:56:55 -04:00
Nick Mathewson
3f9c036821
Try a little harder to work around mingw clock_gettime weirdness
2016-07-26 08:22:37 -04:00
Roger Dingledine
81cc31d3fa
three typo fixes i found in my sandbox
2016-07-25 20:17:35 -04:00
Peter Palfrader
518c8fe0ec
Also ship compat_time.h in release tarballs. Fixes bug #19746
2016-07-25 09:07:29 +02:00
Nick Mathewson
53f9f71985
ug no, the RIGHT fix.
2016-07-21 15:29:56 +02:00
Nick Mathewson
9c210d0e81
Avoid infinite stack explosion in windows monotime.
...
[init calls get calls init calls get calls init.... ]
2016-07-21 15:26:05 +02:00
Nick Mathewson
1d0775684d
Once more, 32-bit fixes on monotime mocking
2016-07-21 14:32:15 +02:00
Nick Mathewson
9c87869dde
Merge branch 'maint-0.2.8'
2016-07-21 14:15:19 +02:00
Nick Mathewson
f1973e70a4
Coverity hates it when we do "E1 ? E2 : E2".
...
It says, 'Incorrect expression (IDENTICAL_BRANCHES)'
Fix for CID 1364127. Not in any released Tor.
2016-07-21 14:14:33 +02:00
Nick Mathewson
22314f9050
loony mingwcross bug: insist we dont have clock_gettime.
2016-07-21 14:09:00 +02:00
Nick Mathewson
852cff043b
fix monotime test mocking on 32-bit systems
2016-07-21 14:05:29 +02:00
Nick Mathewson
61ce6dcb40
Make monotime test mocking work with oom tests.
2016-07-21 07:02:34 -04:00
Nick Mathewson
50463524a9
Use new mock functions in buffer/time_tracking test
2016-07-21 07:02:33 -04:00
Nick Mathewson
2d26b1a549
Actually make monotonic time functions mockable.
...
This is different from making the functions mockable, since
monotime_t is opaque and so providing mocks for the functions is
really hard.
2016-07-21 07:02:33 -04:00
Nick Mathewson
72a1f0180d
Revert "Make the monotonic{_coarse,}_get() functions mockable."
...
This reverts commit 2999f0b33f
.
2016-07-21 10:30:21 +02:00
Nick Mathewson
2999f0b33f
Make the monotonic{_coarse,}_get() functions mockable.
2016-07-21 10:25:23 +02:00
Nick Mathewson
a31078a581
Merge branch 'maint-0.2.8'
2016-07-19 12:34:37 +02:00
Nick Mathewson
4d5b252f0f
Merge branch 'maint-0.2.7' into maint-0.2.8
2016-07-19 12:34:27 +02:00
Nick Mathewson
4d70ed7be0
Merge branch 'maint-0.2.6' into maint-0.2.7
2016-07-19 12:32:14 +02:00
Nick Mathewson
210928f66a
Merge branch 'maint-0.2.5' into maint-0.2.6
2016-07-19 12:31:54 +02:00
Nick Mathewson
d95c2809b3
Merge branch 'maint-0.2.4' into maint-0.2.5
2016-07-19 12:31:20 +02:00
Nick Mathewson
558f7d3701
Merge branch 'monotonic_v2_squashed'
2016-07-19 11:42:26 +02:00
Nick Mathewson
1e3cf1cc83
Be sure to call monotime_init() at startup.
2016-07-19 11:40:47 +02:00
Nick Mathewson
6ba415d400
Make sure initialized_at is initialized before use.
2016-07-19 11:40:47 +02:00
Nick Mathewson
abcb8ce25d
Unit tests for monotonic time
2016-07-19 11:40:47 +02:00
Nick Mathewson
2a217ef723
Expose monotonic time ratchet functions for testing.
2016-07-19 11:40:47 +02:00
Nick Mathewson
7bc4ca7de9
Remove tor_gettimeofday_cached_monotonic as broken and unneeded
2016-07-19 11:40:47 +02:00
Nick Mathewson
c7558c906a
Use coarse monotonic timer instead of cached monotonized libevent time.
2016-07-19 11:40:46 +02:00
Nick Mathewson
6a2002fc09
convert timers.c to use real monotonic time.
2016-07-19 11:40:46 +02:00
Nick Mathewson
dc6f5d1dc1
Basic portable monotonic timer implementation
...
This code uses QueryPerformanceCounter() [**] on Windows,
mach_absolute_time() on OSX, clock_gettime() where available, and
gettimeofday() [*] elsewhere.
Timer types are stored in an opaque OS-specific format; the only
supported operation is to compute the difference between two timers.
[*] As you know, gettimeofday() isn't monotonic, so we include
a simple ratchet function to ensure that it only moves forward.
[**] As you may not know, QueryPerformanceCounter() isn't actually
always as monotonic as you might like it to be, so we ratchet that
one too.
We also include a "coarse monotonic timer" for cases where we don't
actually need high-resolution time. This is GetTickCount{,64}() on
Windows, clock_gettime(CLOCK_MONOTONIC_COARSE) on Linux, and falls
back to regular monotonic time elsewhere.
2016-07-19 11:40:46 +02:00
Karsten Loesing
79939c6f11
Update geoip and geoip6 to the July 6 2016 database.
2016-07-18 08:40:22 +02:00
teor (Tim Wilson-Brown)
d8cd994ef6
Allow clients to retry HSDirs much faster in test networks
2016-07-18 13:25:15 +10:00
teor (Tim Wilson-Brown)
6afd5506e9
Rewrite test-network.sh so out-of-tree and $PATH binaries work
2016-07-18 12:15:49 +10:00
Andrea Shepard
94c27d4e8f
Keep make check-spaces happy
2016-07-17 23:22:29 +00:00
Nick Mathewson
c138c9a2be
Merge branch 'maint-0.2.8'
2016-07-17 13:55:04 -04:00
Nick Mathewson
fbae15a856
Merge remote-tracking branch 'weasel/bug19660' into maint-0.2.8
2016-07-17 13:54:40 -04:00
Nick Mathewson
bec4e41f4b
Fix warnings in test_util_formats.
...
Storing 255 into a char gives a warning when char is signed.
Fixes bug 19682; bugfix on 0.2.8.1-alpha, where these tests were added.
2016-07-17 13:51:45 -04:00
teor (Tim Wilson-Brown)
579a80d4ae
Clients avoid choosing nodes that can't do ntor
...
If we know a node's version, and it can't do ntor, consider it not running.
If we have a node's descriptor, and it doesn't have a valid ntor key,
consider it not running.
Refactor these checks so they're consistent between authorities and clients.
2016-07-15 09:55:49 +10:00
teor (Tim Wilson-Brown)
a76d528bec
Clients no longer download descriptors for relays without ntor
2016-07-15 09:55:49 +10:00
teor (Tim Wilson-Brown)
24e8bb2d83
Relays make sure their own descriptor has an ntor key
2016-07-15 09:55:49 +10:00
teor (Tim Wilson-Brown)
33da2abd05
Authorities reject descriptors without ntor keys
...
Before, they checked for version 0.2.4.18-rc or later, but this
would not catch relays without version lines, or buggy or malicious
relays missing an ntor key.
2016-07-15 09:55:49 +10:00
U+039b
c735220a0b
Remove bufferevents dead code
...
Signed-off-by: U+039b <*@0x39b.fr>
2016-07-14 18:46:37 +02:00
Nick Mathewson
9932544297
Merge branch 'maint-0.2.8'
2016-07-13 09:19:35 -04:00
Nick Mathewson
bb731ca665
Merge remote-tracking branch 'Jigsaw52/seccomp-fix-18397' into maint-0.2.8
2016-07-13 09:16:59 -04:00
Peter Palfrader
36b06be738
Add (SOCK_DGRAM, IPPROTO_UDP) sockets to the sandboxing whitelist
...
If we did not find a non-private IPaddress by iterating over interfaces,
we would try to get one via
get_interface_address6_via_udp_socket_hack(). This opens a datagram
socket with IPPROTO_UDP. Previously all our datagram sockets (via
libevent) used IPPROTO_IP, so we did not have that in the sandboxing
whitelist. Add (SOCK_DGRAM, IPPROTO_UDP) sockets to the sandboxing
whitelist. Fixes bug 19660.
2016-07-11 09:37:01 +02:00
Daniel Pinto
20e89453fd
Adds missing syscalls to seccomp filter.
...
Fixes #18397 which prevented tor starting with Sandbox 1.
2016-07-09 00:36:37 +01:00
Nick Mathewson
aa971c5924
Move our "what time is it now" compat functions into a new module
...
I'm not moving our "format and parse the time" functions, since
those have been pretty volatile over the last couple of years.
2016-07-08 10:38:59 -04:00
Nick Mathewson
466259eb50
Merge remote-tracking branch 'sebastian/libevent2'
2016-07-08 09:57:31 -04:00
Nick Mathewson
a931d157fd
Bump maint-0.2.8 to 0.2.8.5-rc-dev
2016-07-07 12:43:52 -04:00
Nick Mathewson
acba4cc954
test coverage on onion_fast: 0%->100%
2016-07-06 13:43:12 -04:00
Nick Mathewson
08cc0ef832
Capture the LOG_ERR messages in our tests that had logged errors.
...
(It's confusing for the test to write an expected error to stdout,
and then tell the user "OK".)
2016-07-06 13:01:08 -04:00
Nick Mathewson
96d32f02f2
When saving mocked log messages, always create the list.
...
Otherwise, our code needs to check "list && smarlist_len(list)..."
2016-07-06 12:59:43 -04:00
Nick Mathewson
ae22c249c3
Improve test coverage a little on onion*.c
2016-07-06 12:37:52 -04:00
Nick Mathewson
9c1d8cdd8d
Merge branch 'maint-0.2.8'
2016-07-06 10:17:22 -04:00
Nick Mathewson
3252550fc5
Fix sign in test-timers
2016-07-06 10:07:02 -04:00
teor (Tim Wilson-Brown)
b167e82f62
When checking if a routerstatus is reachable, don't check the node
...
This fixes #19608 , allowing IPv6-only clients to use
microdescriptors, while preserving the ability of bridge clients
to have some IPv4 bridges and some IPv6 bridges.
Fix on c281c036
in 0.2.8.2-alpha.
2016-07-06 14:46:22 +10:00
Nick Mathewson
78196c8822
Merge remote-tracking branch 'teor/bug18456'
2016-07-05 19:10:08 -04:00
David Goulet
245c10de07
Test: fix shared random test checking bad errno
...
The test was checking for EISDIR which is a Linux-ism making other OSes
unhappy. Instead of checking for a negative specific errno value, just make
sure it's negative indicating an error. We don't need more for this test.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-05 14:00:06 -04:00
Nick Mathewson
1135405c8c
Fix a variable-shadowing bug in check_private_dir
...
We introduded a shadowed variable, thereby causing a log message to
be wrong. Fixes 19578. I believe the bug was introduced by
54d7d31cba
in 0.2.2.29-beta.
2016-07-05 13:43:58 -04:00
Nick Mathewson
5a047cdc5f
Fix shared-random test
2016-07-05 13:31:18 -04:00
Nick Mathewson
8f44d2822e
Update version to 0.2.8.5-rc. This is not yet a release.
2016-07-05 13:05:36 -04:00
Nick Mathewson
5c97b42cac
Merge branch 'maint-0.2.8'
2016-07-05 12:52:30 -04:00
Nick Mathewson
e99cc8740f
Repair unit test that assumed we have 9 dirauths.
2016-07-05 12:52:19 -04:00
Nick Mathewson
8cae4abbac
Merge branch 'maint-0.2.8'
2016-07-05 12:43:17 -04:00
Nick Mathewson
8d25ab6347
Merge remote-tracking branch 'weasel/bug19557' into maint-0.2.8
2016-07-05 12:40:25 -04:00
Nick Mathewson
74cbbda86e
Merge remote-tracking branch 'weasel/bug19556' into maint-0.2.8
2016-07-05 12:39:40 -04:00
Nick Mathewson
f54ffa463a
Merge branch 'maint-0.2.8'
2016-07-05 12:23:25 -04:00
Nick Mathewson
f4408747d3
Merge branch 'maint-0.2.7' into maint-0.2.8
2016-07-05 12:23:14 -04:00
Nick Mathewson
6e96aadadb
Merge branch 'maint-0.2.6' into maint-0.2.7
2016-07-05 12:22:47 -04:00
Nick Mathewson
c28ba994ec
Merge branch 'maint-0.2.5' into maint-0.2.6
2016-07-05 12:21:25 -04:00
Nick Mathewson
9d3de77d4d
Merge branch 'maint-0.2.4' into maint-0.2.5
2016-07-05 12:20:42 -04:00
Nick Mathewson
e11cc95717
Merge remote-tracking branch 'asn/bug19555'
2016-07-05 12:17:21 -04:00