Andrea Shepard
ca5ba2956b
Support connection_exit_connect() to AF_UNIX sockets
2015-01-28 14:30:23 -05:00
Andrea Shepard
6564291601
Handle config options for AF_UNIX hidden services rendservice.c
2015-01-28 14:30:23 -05:00
Arthur Edelstein
cb714d896c
Bug #8405 : Report SOCKS username/password in CIRC status events
...
Introduces two new circuit status name-value parameters: SOCKS_USERNAME
and SOCKS_PASSWORD. Values are enclosing in quotes and unusual characters
are escaped.
Example:
650 CIRC 5 EXTENDED [...] SOCKS_USERNAME="my_username" SOCKS_PASSWORD="my_password"
2015-01-28 12:02:15 -05:00
Nick Mathewson
32dad3b83b
Add GETINFO consensus/{valid-{after,until},fresh-until}
2015-01-28 11:28:21 -05:00
Nick Mathewson
c240eea0df
more typo fixes from mcs and gk
2015-01-28 11:25:37 -05:00
Nick Mathewson
f75ca04520
Tweak tor-resolve docs and logs
...
Resolves 14325
2015-01-28 10:11:08 -05:00
Nick Mathewson
e9caa8645e
Try to work around changes in openssl 1.1.0
...
Prefer not to use a couple of deprecated functions; include more
headers in tortls.c
This is part of ticket 14188.
2015-01-28 10:00:58 -05:00
Nick Mathewson
20d0b1a04e
Bump a client authorization message from debug to info.
...
A user wants this for 14015, and it seems fairly reasonable.
2015-01-28 09:42:28 -05:00
Nick Mathewson
9c4328c038
New GETINFO consensus/packages to expose package information from consensus
2015-01-27 16:40:32 -05:00
Nick Mathewson
1e61b45251
Fixes on prop227 comments, based on comments by mcs on #10395
2015-01-27 16:31:48 -05:00
Andrea Shepard
03d6a31716
Groundwork for AF_UNIX hidden services in rendservice.c
2015-01-27 06:22:37 +00:00
Nick Mathewson
a598d0f575
Bail early in cpuworker_onion_handshake_replyfn if the circuit is marked
2015-01-26 10:19:07 -05:00
Nick Mathewson
8f9fb3e8fa
Try to fix some more memory leaks in the unit tests
2015-01-23 11:35:05 -05:00
Nick Mathewson
614fbf1812
Fix some memory leaks in new address tests
2015-01-23 11:26:40 -05:00
Nick Mathewson
034e2788f8
whitespace fixes
2015-01-23 11:18:28 -05:00
Nick Mathewson
7322de15dc
Split the slow unit tests into their own binary
...
This can run in parallel with the faster ones and the other tests.
2015-01-23 11:15:53 -05:00
Nick Mathewson
420037dcef
Merge branch 'if_addr_refactoring_squashed'
...
Conflicts:
src/test/include.am
src/test/test.c
2015-01-23 10:13:37 -05:00
rl1987
3966145dff
Refactor code that looks up addresses from interfaces
...
Now the code has separate implementation and examination functions,
uses smartlists sanely, and has relatively decent test coverage.
2015-01-23 10:07:17 -05:00
Nick Mathewson
6c443e987d
Tweak the 9969 fix a little
...
If we have busy nodes and excluded nodes, then don't retry with the
excluded ones enabled. Instead, wait for the busy ones to be nonbusy.
2015-01-23 09:37:08 -05:00
Nick Mathewson
5d4bb6f61f
Merge remote-tracking branch 'public/ticket9969'
...
Conflicts:
src/or/directory.c
src/or/routerlist.c
src/or/routerlist.h
src/test/include.am
src/test/test.c
2015-01-23 09:36:00 -05:00
Nick Mathewson
b677ccd3ab
Merge remote-tracking branch 'public/ticket13762'
2015-01-23 08:55:31 -05:00
Nick Mathewson
d8517fe843
Merge remote-tracking branch 'origin/maint-0.2.5'
2015-01-23 08:53:21 -05:00
Nick Mathewson
7cbdec578b
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
2015-01-23 08:52:55 -05:00
Nick Mathewson
df4c484021
Merge remote-tracking branch 'karsten/geoip6-jan2015' into maint-0.2.4
2015-01-23 08:52:35 -05:00
Nick Mathewson
dbd5a9a8f9
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2015-01-23 08:52:20 -05:00
Nick Mathewson
4a6b43bf76
fix some warnings in compat_threads.c
2015-01-22 14:22:39 -05:00
Nick Mathewson
1fb9979eb8
Move a redundant _GNU_SOURCE to where it is not redundant
2015-01-22 14:18:10 -05:00
Karsten Loesing
a9ce0cd659
Update geoip6 to the January 7 2015 database.
2015-01-22 09:58:29 +01:00
Karsten Loesing
c3f8f5ab0e
Update geoip to the January 7 2015 database.
2015-01-22 09:56:54 +01:00
Nick Mathewson
38b3f9a619
use the correct free fn. spotted by dgoulet
2015-01-21 14:54:38 -05:00
Nick Mathewson
23fc1691b6
Merge branch 'better_workqueue_v3_squashed'
2015-01-21 14:47:16 -05:00
David Goulet
84f5cb749d
Fix: remove whitespace and update a comment in cpuworker.c
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21 14:31:02 -05:00
David Goulet
f52ac5be74
Fix: change copyright year in workqueue and thread tests
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21 14:31:02 -05:00
David Goulet
d684dbb0c7
Support monotonic time for pthread_cond_timedwait
...
This is to avoid that the pthread_cond_timedwait() is not affected by time
adjustment which could make the waiting period very long or very short which
is not what we want in any cases.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21 14:29:12 -05:00
Nick Mathewson
f0415c1600
Merge branch 'bug9819'
2015-01-21 13:00:26 -05:00
Nick Mathewson
523e920d53
fix a comment
2015-01-21 13:00:14 -05:00
Nick Mathewson
3c8dabf69a
Fix up some workqueue/threading issues spotted by dgoulet.
2015-01-21 12:26:41 -05:00
Nick Mathewson
ac5b70c700
handle EINTR in compat_*threads.c
2015-01-21 12:18:11 -05:00
Nick Mathewson
e7e33d4b04
Merge branch 'bug14084'
2015-01-20 14:07:37 -05:00
Nick Mathewson
9ddc1fb10c
Merge remote-tracking branch 'dgoulet/bug14224_025_v1'
2015-01-20 14:02:07 -05:00
Nick Mathewson
da423532f7
Merge branch 'ticket14254_squashed'
2015-01-20 13:46:56 -05:00
Nick Mathewson
78c53eff85
Fix SocksSocket 0. That was easy!
2015-01-20 13:46:44 -05:00
Nick Mathewson
061682c829
Some days I just can't C.
2015-01-19 11:58:40 -05:00
Nick Mathewson
2e8b8c8698
Make check-spaces happier.
2015-01-19 11:56:03 -05:00
Nick Mathewson
f92b01b963
Remove a now-needless testing workaround.
2015-01-19 11:55:52 -05:00
Nick Mathewson
a8dd930274
Replace a 4 with a 6; fix a bug that nobody noticed :/
...
Fixes 14280 bugfix on 1053af0b9c
in 0.2.4.7-alpha.
2015-01-19 11:51:08 -05:00
Nick Mathewson
1053af0b9c
Merge branch 'bug7555_v2_squashed'
...
Conflicts:
src/or/connection_edge.c
2015-01-19 11:43:41 -05:00
Nick Mathewson
758d77130c
Add a bunch of new comments to explain connection_ap_rewrite{,_and_attach}
...
Also, do a little light refactoring to move some variable declarations
around and make a few things const
Also fix an obnoxious bug on checking for the DONE stream end reason.
It's not a flag; it's a possible value or a variable that needs to be
masked.
2015-01-19 11:30:22 -05:00
David Goulet
b5525476f5
Fix: close intro circuit if no more intro points are usable
...
Once a NACK is received on the intro circuit, tor tries an other usable one
by extending the current circuit to it. If no more intro points are usable,
now close the circuit. Also, it's reason is changed before closing it so we
don't report again an intro point failure and trigger an extra HS fetch.
Fixes #14224
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-19 10:23:58 -05:00
David Goulet
b3c1152bae
Fix: close intro circuit if no more intro points are usable
...
Once a NACK is received on the intro circuit, tor tries an other usable one
by extending the current circuit to it. If no more intro points are usable,
now close the circuit.
Fixes #14224
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-19 09:44:11 -05:00
Nick Mathewson
63765399eb
Merge remote-tracking branch 'public/ticket13037'
...
Conflicts:
src/or/config.c
2015-01-18 16:07:08 -05:00
Roger Dingledine
5aa55a1369
Remove the unused rend_cache_entry_t->received field.
...
(Patch from arma, commit message from nick.)
Closes #14222 .
2015-01-18 15:53:06 -05:00
Nick Mathewson
fae72a8d0a
Merge remote-tracking branch 'public/bug14219_025'
2015-01-18 15:41:13 -05:00
Roger Dingledine
9407040c59
Do not replace a HS descriptor with a different replica of itself
...
This fixes a bug where we'd fetch different replicas of the same
descriptor for a down hidden service over and over, until we got lucky
and fetched the same replica twice in a row.
Fixes bug 14219; bugfix on 0.2.0.10-alpha.
(Patch from Roger; commit message and changes file by Nick.)
2015-01-18 15:39:12 -05:00
Nick Mathewson
efdac2a68c
Merge remote-tracking branch 'public/bug14261_025'
...
Conflicts:
src/or/directory.c
2015-01-18 15:28:35 -05:00
Nick Mathewson
ceb6dee465
Increase limit for status vote download size by a factor of 5.
...
We've started to hit the limit here. We introduced the limit in
0.1.2.5-alpha. This fixes bug 14261, but we should have a smarter way
to not actually do the behavior this permits. See #14267 for a ticket
about fixing that.
2015-01-18 15:25:29 -05:00
Nick Mathewson
54e4aaf52c
Fix memory leak in connection_ap_handshake_rewrite_and_attach()
...
Spotted by asn. #14259 . Bugfix on 368eb6a97
in 0.2.0.1-alpha.
2015-01-18 14:19:26 -05:00
Nick Mathewson
79e12da861
Merge remote-tracking branch 'public/bug12485'
2015-01-18 13:49:30 -05:00
Nick Mathewson
ba17cdfb0a
fix another mingw64 unit test warnin
2015-01-16 11:49:58 -05:00
Nick Mathewson
31838bd783
changes suggested by weasel
2015-01-16 11:46:20 -05:00
Nick Mathewson
485fdcf826
Unify parse_unix_socket_config and parse_port_config
...
This incidentally makes unix SocksSocket support all the same options
as SocksPort.
This patch breaks 'SocksSocket 0'; next will restore it.
Resolves 14254.
2015-01-16 11:35:48 -05:00
Nick Mathewson
bbad23bf37
No, client-side DNS cacheing should not be on by default.
2015-01-16 09:32:22 -05:00
Nick Mathewson
4b23b398a3
Merge branch 'bug8546_squashed'
...
Conflicts:
src/or/connection.c
src/or/or.h
src/or/relay.c
2015-01-16 09:31:50 -05:00
Nick Mathewson
49bdfbabb4
Replace field-by-field copy with memcpy for entry_port_cfg
2015-01-16 09:23:03 -05:00
Nick Mathewson
13dac5e463
Move entry_port_cfg_t fields in entry_connection_t
...
Also rename some options for uniformity, and apply this script:
@@
entry_connection_t *conn;
@@
conn->
+entry_cfg.
\(
isolation_flags
\|
session_group
\|
socks_prefer_no_auth
\|
ipv4_traffic
\|
ipv6_traffic
\|
prefer_ipv6
\|
cache_ipv4_answers
\|
cache_ipv6_answers
\|
use_cached_ipv4_answers
\|
use_cached_ipv6_answers
\|
prefer_ipv6_virtaddr
\)
2015-01-16 09:22:58 -05:00
Nick Mathewson
58d17add5e
Combine entry_port_cfg_t fields in listener_connection_t
...
Also, revise the code using these options with this cocci script:
@@
listener_connection_t *conn;
@@
conn->
+entry_cfg.
\(
isolation_flags
\|
session_group
\|
socks_prefer_no_auth
\|
ipv4_traffic
\|
ipv6_traffic
\|
prefer_ipv6
\|
cache_ipv4_answers
\|
cache_ipv6_answers
\|
use_cached_ipv4_answers
\|
use_cached_ipv6_answers
\|
prefer_ipv6_virtaddr
\)
2015-01-16 09:22:53 -05:00
Nick Mathewson
f444f2b1d3
Split client-specific and server-specific parts of port_cfg_t
...
Also, apply this cocci script to transform accesses. (Plus manual
migration for accesses inside smartlist_foreach loops.)
@@
port_cfg_t *cfgx;
@@
cfgx->
+server_cfg.
\(
no_advertise
\|
no_listen
\|
all_addrs
\|
bind_ipv4_only
\|
bind_ipv6_only
\)
@@
port_cfg_t *cfgx;
@@
cfgx->
+entry_cfg.
\(
isolation_flags
\|
session_group
\|
socks_prefer_no_auth
\|
ipv4_traffic
\|
ipv6_traffic
\|
prefer_ipv6
\|
cache_ipv4_answers
\|
cache_ipv6_answers
\|
use_cached_ipv4_answers
\|
use_cached_ipv6_answers
\|
prefer_ipv6_virtaddr
\)
2015-01-16 09:22:49 -05:00
Nick Mathewson
2329d9fe37
Fix a compilation warning in the unit tests
2015-01-15 12:56:57 -05:00
Nick Mathewson
746bb55851
Ignore warning for redundant decl in openssl/srtp.h
...
Backports some commits from tor master.
2015-01-15 12:38:08 -05:00
Nick Mathewson
3368b0c9f2
Add string for IP_NOW_REDUNDANT in circuit_end_reason_to_control_string
...
Closes 14207; bugfix on 0.2.6.2-alpha.
2015-01-15 11:53:20 -05:00
George Kadianakis
bb56fd1f8f
unittests: use tt_i64_op() instead of tt_int_op() in laplace tests.
...
Do this in even more places to try to fix the build.
2015-01-15 11:08:22 -05:00
Nick Mathewson
a52e549124
Update workqueue implementation to use a single queue for the work
...
Previously I used one queue per worker; now I use one queue for
everyone. The "broadcast" code is gone, replaced with an idempotent
'update' operation.
2015-01-15 11:05:22 -05:00
Roger Dingledine
660a35d97c
fix typo
2015-01-15 11:03:13 -05:00
Nick Mathewson
52d6cb03a7
Merge remote-tracking branch 'andrea/bug12194_alt'
2015-01-15 10:26:35 -05:00
Nick Mathewson
88e36eaf0e
Fix the checkdir/perms test when umask==077
...
Fixes 14215; bugfix on 0.2.6.2-alpha. Reported by "cypherpunks".
2015-01-15 10:24:27 -05:00
Andrea Shepard
f7bb60e202
Add comments in rendclient.c noting that certain functions involved in handling ended HS connection attempts must be idempotent
2015-01-15 15:19:31 +00:00
George Kadianakis
354ddf8712
unittests: use tt_i64_op() instead of tt_int_op() in laplace tests.
2015-01-15 15:14:33 +00:00
George Kadianakis
25e7821bb1
unittests: Change some tt_assert()s to tt_int_op()s.
2015-01-15 14:43:58 +00:00
George Kadianakis
45bc5a0743
Restrict sample values of the Laplace distribution to int64_t.
...
This helps avoid undefined behavior from casting big double values to
int64_t. Fixes #14090 .
2015-01-15 14:43:58 +00:00
Nick Mathewson
3668a4126e
Merge remote-tracking branch 'public/bug13397'
2015-01-14 14:15:29 -05:00
Nick Mathewson
1686f81ac2
Merge remote-tracking branch 'origin/maint-0.2.5'
2015-01-14 13:30:10 -05:00
Nick Mathewson
051ad788e0
Incorporate some comments based on notes from dgoulet
2015-01-14 11:31:14 -05:00
Nick Mathewson
fb5ebfb507
Avoid chan/circ linear lookups for requests
...
The solution I took is to not free a circuit with a pending
uncancellable work item, but rather to set its magic number to a
sentinel value. When we get a work item, we check whether the circuit
has that magic sentinel, and if so, we free it rather than processing
the reply.
2015-01-14 11:31:12 -05:00
Nick Mathewson
6c9c54e7fa
Remove if (1) indentation in cpuworker.c
...
To avoid having diffs turn out too big, I had replaced some unneeded
ifs and fors with if (1), so that the indentation would still work out
right. Now I might as well clean those up.
2015-01-14 11:28:26 -05:00
Nick Mathewson
1e896214e7
Refactor cpuworker to use workqueue/threadpool code.
2015-01-14 11:23:34 -05:00
Nick Mathewson
cc6529e9bb
Fix check-spaces
2015-01-14 11:19:35 -05:00
Nick Mathewson
e5f8c772f4
Test and fix workqueue_entry_cancel().
2015-01-14 11:17:46 -05:00
Nick Mathewson
ebbc177005
Add shutdown and broadcast support to test_workqueue.
2015-01-14 11:17:46 -05:00
Nick Mathewson
81354b081b
Add unit test for thread IDs.
2015-01-14 11:17:43 -05:00
Nick Mathewson
7a63005220
Basic unit test for condition variables.
2015-01-14 11:17:09 -05:00
Nick Mathewson
e47a90a976
"Recursive" locks, not "reentrant" locks. Duh.
2015-01-14 11:12:40 -05:00
Nick Mathewson
d69717f61b
Use correct (absolute) time for pthread_cond_timedwait
2015-01-14 11:09:52 -05:00
Nick Mathewson
9fdc0d0594
Fix windows compilation of condition code
2015-01-14 11:09:51 -05:00
Nick Mathewson
d850ec8574
Fix linux compilation (pipe2 needs _GNU_SOURCE)
2015-01-14 11:09:51 -05:00
Nick Mathewson
74b782645a
Move thread tests into their own module
2015-01-14 11:09:47 -05:00
Nick Mathewson
c51f7c23e3
Test a little more of compat_threads.c
2015-01-14 11:05:56 -05:00
Nick Mathewson
3868b5d210
Rename mutex_for_cond -> mutex_nonreentrant
...
We'll want to use these for other stuff too.
2015-01-14 11:05:56 -05:00
Nick Mathewson
93ad89e9d2
Rename bench_workqueue -> test_workqueue and make it a unit test.
2015-01-14 11:05:56 -05:00
Nick Mathewson
b2db3fb462
Documentation for new workqueue and condition and locking stuff
2015-01-14 11:05:54 -05:00
Nick Mathewson
4abbf13f99
Add a way to tell all threads to do something.
2015-01-14 11:01:21 -05:00