Nick Mathewson
491ffa540f
Move router lookup to _after_ we assert that its argument is set
...
A previous commit in the 5527 branch had moved
router_get_mutable_by_digest(digest_rcvd) to happen before we did
tor_assert(digest_rcvd), which would have defeated the purpose of
the assert.
2012-03-30 10:14:31 -04:00
Nick Mathewson
545cb5f34e
Merge remote-tracking branch 'linus/empty_desc_stats'
2012-03-30 10:06:21 -04:00
Roger Dingledine
3031def726
checking "same addr/port but with nonmatching keys" is obsolete
...
Specifically, I believe it dates back to when extend cells had address:port
but no digest in them. The special edge case is certainly not worth the
complexity these days.
2012-03-29 16:45:25 -04:00
Roger Dingledine
5cb82e44d1
simplify further
2012-03-29 16:37:50 -04:00
Linus Nordberg
20eb38a588
Refactor dirserv_orconn_tls_done().
...
Look up the router using the digest instead of looping over all routers.
2012-03-29 22:01:06 +02:00
Nick Mathewson
f348daa6fb
Merge remote-tracking branch 'linus/bug4875_2'
2012-03-29 10:53:09 -04:00
Nick Mathewson
04a1696095
Merge remote-tracking branch 'linus/bug5151'
2012-03-28 17:18:30 -04:00
Linus Nordberg
734fad4103
Make relays handle an address suggestion from a directory server giving an IPv6 address.
...
last_guessed_ip becomes a tor_addr_t.
Most parts of router_new_address_suggestion() learns
about IPv6 (resolve_my_address() is still IPv4 only).
2012-03-28 22:16:55 +02:00
Linus Nordberg
1b6f6bfda5
Don't try to generate stats from an empty served_descs.
2012-03-28 20:57:45 +02:00
Sebastian Hahn
77bc1b803e
Fix a bunch of check-spaces complaints
2012-03-28 15:02:15 +02:00
Nick Mathewson
a9c0e9fec2
Write initial documentation for the contents of the state file
...
Fixes bug 2987. There is still some information to go, but now we
have a place to put it.
2012-03-28 04:08:56 -04:00
Nick Mathewson
433d757846
Reject SOCKS requests for "localhost" or ".local"
...
Sending them on is futile, since we will be told "127.0.0.1" and then
think we've been lied to. Partial fix for 2822.
2012-03-28 03:19:00 -04:00
Nick Mathewson
70c17134c7
Rate-limit the warnings as a client when asked to connect a private addr
...
Partial fix for ticket 2822.
2012-03-28 03:06:25 -04:00
Nick Mathewson
d20c6d2a37
Keep separate time-to-downloads for each consensus flavor
...
This is a fix for bug 4011, where if we have a recent ns consensus we
won't even try fetching a microdesc consensus. Fix on 0.2.3.1-alpha,
I believe.
2012-03-28 02:55:33 -04:00
Nick Mathewson
de0dca0de7
Refactor the API for setting up a block cipher.
...
It allows us more flexibility on the backend if the user needs to
specify the key and IV at setup time.
2012-03-27 22:37:56 -04:00
Nick Mathewson
342e753d31
Merge remote-tracking branch 'karsten/bug5053'
2012-03-27 11:22:32 -04:00
Nick Mathewson
5a2d0fbe64
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/control.c
2012-03-26 18:51:37 -04:00
Nick Mathewson
6dcbfec82d
Merge remote-tracking branch 'rransom-tor/safecookie-022-v3' into maint-0.2.2
2012-03-26 14:03:29 -04:00
Sebastian Hahn
fe2b177cfb
Never disable debugger attachment for the unit tests
2012-03-22 12:50:44 +01:00
Linus Nordberg
341e37e38c
Move the logging of 'My line' to debug level ( #5151 ).
2012-03-19 05:12:19 +01:00
Linus Nordberg
bb2135fea6
Reorder initialisation of port_cfg to match order of members in struct.
2012-03-19 04:57:19 +01:00
Linus Nordberg
ce5489eec0
Fix cut'n'paste bug ( #5151 ).
2012-03-19 04:55:17 +01:00
Roger Dingledine
12594f27db
Stop discarding command-line arguments when TestingTorNetwork is set
...
Discovered by Kevin Bauer. Fixes bug 5373; bugfix on 0.2.3.9-alpha,
where task 4552 added support for two layers of torrc files.
2012-03-14 02:40:04 -04:00
Nick Mathewson
9f88c1e14f
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/circuitbuild.c
2012-03-09 14:30:12 -05:00
Nick Mathewson
99bd5400e8
Never choose a bridge as an exit. Bug 5342.
2012-03-09 14:27:50 -05:00
Nick Mathewson
978cfcfbbb
Merge remote-tracking branch 'origin/maint-0.2.2'
2012-03-09 14:25:18 -05:00
Nick Mathewson
8abfcc0804
Revise "sufficient exit nodes" check to work with restrictive ExitNodes
...
If you set ExitNodes so that only 1 exit node is accepted, the
previous patch would have made you unable to build circuits.
2012-03-09 14:23:23 -05:00
Nick Mathewson
d4526e1d4a
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/routerlist.c
2012-03-09 13:57:32 -05:00
Nick Mathewson
ec8a06c5a1
Require a threshold of exit nodes before building circuits
...
This mitigates an attack proposed by wanoskarnet, in which all of a
client's bridges collude to restrict the exit nodes that the client
knows about. Fixes bug 5343.
2012-03-08 15:42:54 -05:00
Nick Mathewson
3fc3ed50a1
Merge remote-tracking branch 'public/bug4361'
...
Conflicts:
src/or/command.c
2012-03-08 14:23:52 -05:00
Roger Dingledine
b5a8c3aa00
Remove misleading function comment (bug 5324)
...
In the distant past, connection_handle_read() could be called when there
are pending bytes in the TLS object during the main loop. The design
since then has been to always read all pending bytes immediately, so
read events only trigger when the socket actually has bytes to read.
Resolves bug 5324.
2012-03-07 21:07:30 -05:00
Nick Mathewson
298e08132f
Merge remote-tracking branch 'public/bug4760'
2012-03-05 10:44:48 -05:00
Nick Mathewson
6a0d809f44
Merge remote-tracking branch 'sebastian/bug5231'
2012-02-29 15:16:15 -05:00
Roger Dingledine
406bc95271
Merge branch 'maint-0.2.2'
2012-02-29 13:23:23 -05:00
Roger Dingledine
e21756908f
new ip address for maatuska
2012-02-29 13:22:41 -05:00
Roger Dingledine
c26aaf9cba
whitespace fix
2012-02-29 13:17:52 -05:00
Sebastian Hahn
2755b09c52
Don't cannibalize already cannibalized circuits
...
This ensures we don't build circuits that have 5 hops or more. Patch
contributed by wanoskarnet, thanks!
2012-02-25 17:59:21 +01:00
Daniel Bryg
f7e87f41f7
When not fetching v2 dir info, don't require it for cleaning descriptors
...
Bugfix on 0.2.2.26-beta, which introduced the idea of caches not
cacheing v2 info. Fixes bug 4838.
2012-02-23 13:59:37 -05:00
Robert Ransom
e111e371b4
Implement 'safe cookie authentication'
2012-02-22 05:46:09 -08:00
Roger Dingledine
3a94530595
document a cool attack that we evaluated
2012-02-17 14:02:25 -05:00
Nick Mathewson
eaedcba493
Merge branch 'bug5105-v2-squashed'
...
Conflicts:
src/or/transports.c
2012-02-17 11:50:10 -05:00
Robert Ransom
33552c16ca
Heap-allocate strings returned by get_current_process_environment_variables
2012-02-17 11:42:21 -05:00
Robert Ransom
c0808b795f
Pass process_environment_t * to tor_spawn_background
...
Now tor_spawn_background's prototype is OS-independent.
2012-02-17 11:42:20 -05:00
Robert Ransom
bf1ce3f53d
Rewrite managed proxy environment setup code
...
Now, the environment setup is entirely OS-independent, as well as less
hacky and brittle.
2012-02-17 11:42:20 -05:00
Nick Mathewson
936b7b7b0b
Downgrade "Registered server transport" msg to notice. Bug 5136
2012-02-15 12:58:36 -05:00
Sebastian Hahn
efb7b9dec1
Use _NSGetEnviron() instead of environ where required
...
OS X would otherwise crash with a segfault when linked statically to
some libraries.
2012-02-14 11:18:39 -05:00
Nick Mathewson
c08dde7e28
Reinstate TOR_PR_EXTENDED_SERVER_PORT, just a little
2012-02-13 00:13:58 -05:00
Sebastian Hahn
93414707ae
set_managed_proxy_environment() can't fail anymore
...
It already couldn't fail on Windows, now it can't fail on non-Windows,
either.
2012-02-12 23:39:58 -05:00
Sebastian Hahn
9857ef0fb5
Properly set up environment for managed-mode obfsproxy
2012-02-12 23:39:58 -05:00
Nick Mathewson
60b42d68f3
Try to have (and maintain!) an invariant about unconfigured_proxies_n
...
The invariant is: unconfigured_proxies_n is exactly the number of
managed_proxy_t not in state PT_PROTO_COMPLETED.
To maintain this, we need to stop overloading unconfigured_proxies_n
to also count managed_proxy_t items that are in PT_PROTO_COMPLETED but
which might need relaunching. To make it so we can detect those, we
introduce another variable.
This commit also adds a function to assert that we haven't broken the
invariant.
Fix for bug 5084; bugfix on 0.2.3.6-alpha, I think.
2012-02-12 23:30:19 -05:00