Commit Graph

31350 Commits

Author SHA1 Message Date
rl1987
c31346ffb4 Print Python version during each Travis CI job 2018-12-06 15:26:34 +02:00
Karsten Loesing
57798eb1cb Update geoip and geoip6 to the December 5 2018 database. 2018-12-05 21:02:39 +01:00
Nick Mathewson
46a321fbdd Merge branch 'maint-0.3.5' 2018-12-05 10:25:12 -05:00
Nick Mathewson
967efc0d28 Merge remote-tracking branch 'tor-github/pr/546' into maint-0.3.5 2018-12-05 10:23:28 -05:00
Nick Mathewson
1eb3719a62 Merge remote-tracking branch 'public/prop298' 2018-12-05 09:43:03 -05:00
Nick Mathewson
1f95e80351 Merge branch 'prop293_squashed' 2018-12-05 09:24:51 -05:00
Nick Mathewson
a2f81b644b Write tests for mark_my_descriptor_dirty_if_too_old() 2018-12-05 09:24:45 -05:00
Nick Mathewson
d4f558e385 Merge remote-tracking branch 'tor-github/pr/531' 2018-12-05 09:02:49 -05:00
Nick Mathewson
4002a84ffe Merge remote-tracking branch 'tor-github/pr/561' 2018-12-05 08:29:41 -05:00
Nick Mathewson
00509aaafa Merge remote-tracking branch 'tor-github/pr/553' 2018-12-05 08:28:54 -05:00
Nick Mathewson
ca4b86f90a Merge remote-tracking branch 'tor-github/pr/508' 2018-12-05 08:19:02 -05:00
Nick Mathewson
c01507a5fe remember why we are doing getsockopt() 2018-12-05 08:14:21 -05:00
Nick Mathewson
4c81ab5914 Merge remote-tracking branch 'tor-github/pr/560' 2018-12-05 08:13:02 -05:00
Nick Mathewson
df70bc3a88 Merge branch 'ticket28479_squashed' 2018-12-05 07:59:44 -05:00
Nick Mathewson
1f6d7bc4af Update ReleasingTor.md to reflect current practice
See #28479.
2018-12-05 07:58:53 -05:00
David Goulet
cec616a0c8 hs-v3: Don't BUG() if descriptor is found on SOCKS connection retry
When retrying all SOCKS connection because new directory information just
arrived, do not BUG() if a connection in state AP_CONN_STATE_RENDDESC_WAIT is
found to have a usable descriptor.

There is a rare case when this can happen as detailed in #28669 so the right
thing to do is put that connection back in circuit wait state so the
descriptor can be retried.

Fixes #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-12-04 14:34:04 -05:00
David Goulet
43bd4d7509 hs-v3: Add the helper function mark_conn_as_waiting_for_circuit
This helper function marks an entry connection as pending for a circuit and
changes its state to AP_CONN_STATE_CIRCUIT_WAIT. The timestamps are set to
now() so it can be considered as new.

No behaviour change, this helper function will be used in next commit.

Part of #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-12-04 14:34:04 -05:00
David Goulet
00b59d9281 conn: Use connection_ap_mark_as_waiting_for_renddesc()
Use the helper function connection_ap_mark_as_waiting_for_renddesc()
introduced in previous commit everywhere in the code where an AP connection
state is transitionned to AP_CONN_STATE_RENDDESC_WAIT.

Part of #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-12-04 14:10:00 -05:00
David Goulet
d0682fe0f1 conn: Add an helper to mark a connection as waiting for an HS descriptor
The transition for a connection to either become or go back in
AP_CONN_STATE_RENDDESC_WAIT state must make sure that the entry connection is
_not_ in the waiting for circuit list.

This commit implements the helper function
connection_ap_mark_as_waiting_for_renddesc() that removes the entry connection
from the pending list and then change its state. This code pattern is used in
many places in the code where next commit will remove this code duplication to
use this new helper function.

Part of #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-12-04 14:00:08 -05:00
David Goulet
8506dcdeb7 Merge branch 'maint-0.3.5' 2018-12-04 12:55:02 -05:00
Nick Mathewson
4f55884315 Add an option to start tor in dormant mode for the first time. 2018-12-04 12:08:24 -05:00
Nick Mathewson
b25b8150c2 Remember in our state file how long we've spent since user activity
Rather than initializing the "Dormant" status to "off" and the "last
activity" count to "now", initialize them based on our state file:
stay dormant if we were dormant, or remember the amount of time
we've spent inactive.
2018-12-04 11:59:11 -05:00
David Goulet
0906dde9d5 man: Document HSv3 client authorization revocation
Removing a ".auth" file revokes a client access to the service but the
rendezvous circuit is not closed service side because the service simply
doesn't know which circuit is for which client.

This commit notes in the man page that to fully revoke a client access to the
service, the tor process should be restarted.

Closes #28275

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-12-04 18:49:19 +02:00
Nick Mathewson
31a6d9f499 Add tests for parsing each routerstatus flag. 2018-12-03 13:40:08 -05:00
Nick Mathewson
92af8e5113 Add a framework for testing set_routerstatus_from_routerinfo().
Additionally, use it to test that is_staledesc is set correctly.

Eventually we'll want to test all the other flags, but I'm aiming
for only adding coverage on the changed code here.
2018-12-03 13:22:23 -05:00
Nick Mathewson
417a324a85 Make input argument const in set_routerstatus_from_routerinfo. 2018-12-03 12:34:29 -05:00
Nick Mathewson
32213fa9ad Keep list of dirauth flags in sync between dirvote.c and fuzz_vrs.c
Suggested by Teor on PR
2018-12-03 12:18:45 -05:00
rl1987
894d207f84 manpage: Mention that adding new HS is unsupported if Sandbox is enabled 2018-12-03 15:23:01 +02:00
rl1987
db9ab3754a Print error message we get from socket.connect_ex when it fails 2018-12-03 14:49:33 +02:00
rl1987
25f3b82445 More logging for #28229 2018-12-03 14:40:37 +02:00
rl1987
9369152aae Check that new listener connection is actually listening 2018-12-03 14:28:32 +02:00
Nick Mathewson
0d9dc13e08 Merge remote-tracking branch 'tor-github/pr/544' 2018-12-02 19:50:04 -05:00
Nick Mathewson
8221b5d587 Merge remote-tracking branch 'tor-github/pr/559' 2018-12-02 19:38:40 -05:00
teor
90ce8d0a58
doc: remove cached-routers from the man page
cached-routers was removed from the code a long time ago
2018-12-03 10:22:49 +10:00
teor
612b21b8ea
comment: replace cached-routers with cached-descriptors
cached-routers has been gone for a long time
2018-12-03 10:19:34 +10:00
Nick Mathewson
0015d00842 Use tor_strdup() in place of malloc+strncpy+terminate. 2018-12-01 20:46:06 -05:00
Nick Mathewson
8accf71c44 Merge remote-tracking branch 'tor-github/pr/556' 2018-12-01 20:35:38 -05:00
Nick Mathewson
2b2b97484a Merge branch 'ticket27490a_squashed' 2018-12-01 20:32:18 -05:00
Neel Chauhan
ad031b64ce Add regression test for ClientAutoIPv6ORPort 2018-12-01 14:55:57 -05:00
Neel Chauhan
81f2828d67 In fascist_firewall_use_ipv6(), say we can use IPv6 if ClientAutoIPv6ORPort is 1 2018-12-01 14:55:57 -05:00
Neel Chauhan
822cb93cab Add new option ClientAutoIPv6ORPort to switch between IPv4 and IPv6 OR ports 2018-12-01 14:55:57 -05:00
rl1987
009205dabe Add changes file 2018-12-01 14:31:17 -05:00
rl1987
353d2a091d Fix coverage build 2018-12-01 14:31:17 -05:00
rl1987
39e158db36 tor-resolve: Rework SOCKS5 response parsing with trunnel 2018-12-01 14:31:17 -05:00
rl1987
8b9d6581f6 tor-resolve: Rework SOCKS5 method negotiation client part with trunnel 2018-12-01 14:31:17 -05:00
rl1987
1051969a1d tor-resolve: parse SOCKS4a reply 2018-12-01 14:31:17 -05:00
rl1987
d49baa77b5 Allow socks4_server_reply version to be 0 (for tor-resolve) 2018-12-01 14:31:17 -05:00
rl1987
83af6d6149 tor-resolve: Use trunnel code for SOCKS5 request generation 2018-12-01 14:31:17 -05:00
rl1987
30582b940e tor-resolve: link tor-resolve binary with trunnel lib 2018-12-01 14:31:17 -05:00
rl1987
a2bb172225 tor-resolve: generate SOCKS4a request with trunnel 2018-12-01 14:31:17 -05:00