Kevin Butler
bb69bf8882
Changed signature for check_nickname_list to remove warnings on free.
2013-08-31 05:14:48 +01:00
Kevin Butler
0513643317
MyFamily option will now fix fingerprints missing their leading instead of complaining. Should fix #4341 .
2013-08-31 04:49:04 +01:00
Cristian Toader
d5f43b5254
_array filter functions now rely on final NULL parameter
2013-08-29 15:42:30 +03:00
Cristian Toader
b1f7105506
supporting /dev/urandom instead of /dev/random
2013-08-29 15:22:14 +03:00
Cristian Toader
148c6dc473
updated open syscall strings
2013-08-26 21:19:22 +03:00
Nick Mathewson
00bcc25d05
Cleanup whitespaces
2013-08-25 12:22:20 -04:00
Nick Mathewson
078d6bcda5
Basic unit test for EVENT_TRANSPORT_LAUNCHED
2013-08-25 11:29:03 -04:00
Nick Mathewson
69312c7a84
Widen event_mask_t to 64 bits
2013-08-25 10:46:53 -04:00
George Kadianakis
6dd462e8bc
Implement the TRANSPORT_LAUNCHED control port event.
2013-08-25 10:37:03 -04:00
Nick Mathewson
2452302354
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-08-25 00:34:23 -04:00
Nick Mathewson
8611195a00
Merge remote-tracking branch 'public/bug9546_023_v2' into maint-0.2.3
2013-08-25 00:32:27 -04:00
Nick Mathewson
4107ddd003
Merge remote-tracking branch 'public/bug9546_v2' into maint-0.2.4
2013-08-25 00:31:51 -04:00
Nick Mathewson
1ee1c8fb4f
Merge remote-tracking branch 'public/bug9366' into maint-0.2.4
2013-08-25 00:29:49 -04:00
Nick Mathewson
3727a978b8
Merge remote-tracking branch 'public/bug9543' into maint-0.2.4
2013-08-25 00:29:06 -04:00
Roger Dingledine
0fd8f5781b
fix typos
2013-08-23 21:43:57 -04:00
Nick Mathewson
223c7da080
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-08-22 20:47:23 -04:00
Nick Mathewson
43f187ec2e
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-08-22 20:47:10 -04:00
Nick Mathewson
8920fc5457
Hide the contents of the circuit_build_times structure.
...
There were only two functions outside of circuitstats that actually
wanted to know what was inside this. Making the structure itself
hidden should help isolation and prevent us from spaghettifying the
thing more.
2013-08-22 10:15:57 -04:00
Nick Mathewson
79cad08b4f
Documentation for new cbt accessors
2013-08-22 10:15:56 -04:00
Nick Mathewson
775c491502
Separate mutable/const accessors for circuit_build_times
...
(These have proved invaluable for other global accessors.)
2013-08-22 10:15:56 -04:00
Nick Mathewson
e1c9b43b8e
Rename get_circuit_nbuild_* to end with _ms
2013-08-22 10:15:56 -04:00
vagrant
4834641dce
Make circ_times static and add accessor functions.
...
Change the global circ_times to a static variable and use
accessor functions throughout the code, instead of
accessing it directly.
2013-08-22 10:15:56 -04:00
Nick Mathewson
2530c84220
Replace return with continue in update_consensus_networkstatus_downloads
...
Fix for bug 9564; bugfix on 0.2.3.14-alpha.
2013-08-22 10:00:37 -04:00
Nick Mathewson
71ec90fdc8
Tweak/cleanup 5526 fix.
2013-08-21 13:41:53 -04:00
Peter Retzlaff
a337d4b7cb
Print accounting information in heartbeat messages.
...
Implements ticket 5526.
2013-08-21 13:26:57 -04:00
Nick Mathewson
af7970b6bc
Add a 30-day maximum on user-supplied MaxCircuitDirtiness
...
Fix for bug 9543.
2013-08-21 11:35:00 -04:00
Nick Mathewson
cbc53a2d52
Make bridges send AUTH_CHALLENGE cells
...
The spec requires them to do so, and not doing so creates a situation
where they can't send-test because relays won't extend to them because
of the other part of bug 9546.
Fixes bug 9546; bugfix on 0.2.3.6-alpha.
2013-08-21 11:29:19 -04:00
Nick Mathewson
940cef3367
Make bridges send AUTH_CHALLENGE cells
...
The spec requires them to do so, and not doing so creates a situation
where they can't send-test because relays won't extend to them because
of the other part of bug 9546.
Fixes bug 9546; bugfix on 0.2.3.6-alpha.
2013-08-21 11:28:58 -04:00
Nick Mathewson
0daa26a473
Send NETINFO on receiving a NETINFO if we have not yet sent one.
...
(Backport to Tor 0.2.3)
Relays previously, when initiating a connection, would only send a
NETINFO after sending an AUTHENTICATE. But bridges, when receiving a
connection, would never send AUTH_CHALLENGE. So relays wouldn't
AUTHENTICATE, and wouldn't NETINFO, and then bridges would be
surprised to be receiving CREATE cells on a non-open circuit.
Fixes bug 9546.
2013-08-21 11:28:57 -04:00
Cristian Toader
bc19ea100c
make check-spaces fixes
2013-08-21 17:57:15 +03:00
Nick Mathewson
1bb4a4f9bd
Send NETINFO on receiving a NETINFO if we have not yet sent one.
...
Relays previously, when initiating a connection, would only send a
NETINFO after sending an AUTHENTICATE. But bridges, when receiving a
connection, would never send AUTH_CHALLENGE. So relays wouldn't
AUTHENTICATE, and wouldn't NETINFO, and then bridges would be
surprised to be receiving CREATE cells on a non-open circuit.
Fixes bug 9546.
2013-08-20 14:52:56 -04:00
Cristian Toader
a9910d89f1
finalised fix on libevent open string issue
2013-08-19 11:41:46 +03:00
Nick Mathewson
a3ffa1f76e
Rename circuit_get_global_list to remove trailing _
2013-08-15 15:37:23 -04:00
Nick Mathewson
d4634d1b72
Merge remote-tracking branch 'majek/bug9108'
...
Conflicts:
src/or/circuitlist.h
2013-08-15 15:36:04 -04:00
Nick Mathewson
74262f1571
Merge branch 'bug5040_4773_rebase_3'
2013-08-15 12:04:56 -04:00
George Kadianakis
794447d03d
Fix some #5040 bugs found by Nick's tests.
...
- Set conn->address when we receive a USERADDR command.
- Set conn->state to a sane value when we transition from Extended
ORPort to ORPort.
2013-08-15 12:03:38 -04:00
George Kadianakis
f549e4c36d
Write some free_all functions to free the auth. cookies.
...
We started allocating space for them on the heap in the previous
commit.
Conflicts:
src/or/ext_orport.h
2013-08-15 12:03:38 -04:00
George Kadianakis
33c3e60a37
Implement and use a generic auth. cookie initialization function.
...
Use the generic function for both the ControlPort cookie and the
ExtORPort cookie.
Also, place the global cookie variables in the heap so that we can
pass them around more easily as pointers.
Also also, fix the unit tests that broke by this change.
Conflicts:
src/or/config.h
src/or/ext_orport.c
2013-08-15 12:03:37 -04:00
George Kadianakis
13784d4753
Warn if the Extended ORPort listens on a public IP address.
2013-08-15 12:03:37 -04:00
George Kadianakis
bdeddecd29
Better documentation for ext_or_auth_correct_client_hash.
2013-08-15 12:03:37 -04:00
Nick Mathewson
28bb673584
White-box tests for the succeeding case of ext_or_port handshake.
...
(Okay, white-box plus mocking enough other functions so they don't
crash.)
2013-08-15 12:03:37 -04:00
Nick Mathewson
ba78a3c800
Make 0x01==SAFECOOKIE a macro, not a magic number
2013-08-15 12:03:37 -04:00
Nick Mathewson
d7358e8598
Expose/mock some functions to make ext_orport.c testing possible
2013-08-15 12:03:37 -04:00
Nick Mathewson
4526c3e0b6
Unit test for basic ext_or_cookie authentication backend
2013-08-15 12:03:37 -04:00
Nick Mathewson
b64351ed17
Split the cryptographic part of handle_client_auth_nonce into new fn
2013-08-15 12:03:36 -04:00
George Kadianakis
e1d1d7a8da
Fix some ext_orport.c DOCDOCs.
2013-08-15 12:03:36 -04:00
Nick Mathewson
03e3881043
Tests for connection_write_ext_or_command.
2013-08-15 12:03:36 -04:00
Nick Mathewson
c342ea9879
Unit tests for ext_or_id_map.
2013-08-15 12:03:36 -04:00
Nick Mathewson
7da59721a9
Unit tests for fetch_ext_or_cmd
2013-08-15 12:03:36 -04:00
Nick Mathewson
9d8ffa91ce
Add a clientmap_entry_free().
...
Remove a nedless strdup/free pair.
2013-08-15 12:03:36 -04:00
Nick Mathewson
34d02484c0
Fix hash functions for transport_name in client entry
2013-08-15 12:03:35 -04:00
Nick Mathewson
50136b6698
Use memdup_nulterm and check for NULs in handle_cmd_transport
2013-08-15 12:03:35 -04:00
Nick Mathewson
550af7be0a
Fix a variety of issues in 4773
...
memwipe some stack-allocated stuff
Add DOCDOC comments for state machines
Use memdup_nulterm as appropriate
Check for NULs in useraddr
Add a macro so that <= AUTH_MAX has a meaning.
2013-08-15 12:03:35 -04:00
Nick Mathewson
6dd8ff0ad9
Break up <??> differently, and explain why
2013-08-15 12:03:35 -04:00
Nick Mathewson
e4a241af11
Add guards to ext_orport.h, rename get_file to get_file_name
2013-08-15 12:03:34 -04:00
Nick Mathewson
6568424410
Use only uintptr_t for the value of transport_count
2013-08-15 12:03:34 -04:00
George Kadianakis
6ad535e6dc
If a single client connects with multiple transports, note all transports.
2013-08-15 12:03:34 -04:00
George Kadianakis
cb54e44587
Fix a number of issues with the #5040 code.
...
- Don't leak if a transport proxy sends us a TRANSPORT command more
than once.
- Don't use smartlist_string_isin() in geoip_get_transport_history().
(pointed out by Nick)
- Use the 'join' argument of smartlist_join_strings() instead of
trying to write the separator on our own.
(pointed out by Nick)
- Document 'ext_or_transport' a bit better.
(pointed out by Nick)
- Be a bit more consistent with the types of the values of 'transport_counts'.
(pointed out by Nick)
2013-08-15 12:03:34 -04:00
George Kadianakis
b2c7379aec
Make check-spaces happy.
2013-08-15 12:03:34 -04:00
Cristian Toader
e2a7b484f4
partial libevent open fix
2013-08-14 23:03:38 +03:00
Cristian Toader
8a85a48b9d
attempt to add stat64 filename filters; failed due to getaddrinfo..
2013-08-12 21:14:43 +03:00
Nick Mathewson
4361795145
Merge remote-tracking branch 'asn/bug9363_take2'
2013-08-12 09:46:54 -04:00
Roger Dingledine
49fd76be05
Merge branch 'maint-0.2.4'
2013-08-10 18:30:20 -04:00
Nick Mathewson
d5cfbf96a2
Fix an uninitialized-read when parsing v3 introduction requests.
...
Fortunately, later checks mean that uninitialized data can't get sent
to the network by this bug. Unfortunately, reading uninitialized heap
*can* (in some cases, with some allocators) cause a crash if you get
unlucky and go off the end of a page.
Found by asn. Bugfix on 0.2.4.1-alpha.
2013-08-10 17:49:51 -04:00
Cristian Toader
44a4464cf6
fixed memory leak, added array filter support
2013-08-10 18:04:48 +03:00
Cristian Toader
89b39db003
updated filters to work with orport
2013-08-09 19:07:20 +03:00
Cristian Toader
b3a8c08a92
orport progress (not functional), nickm suggested fixes
2013-08-07 13:13:12 +03:00
George Kadianakis
0c4baa016f
Also test that server transports get written to Tor's state.
2013-08-05 21:05:39 +03:00
Nick Mathewson
b9f9110ac7
Don't allow all ORPort values to be NoAdvertise
...
Fix for bug #9366
2013-08-05 12:14:48 -04:00
Cristian Toader
356b646976
added execve and multi-configuration support
2013-08-05 15:40:23 +03:00
Cristian Toader
d897690fc7
fixes suggested by nickm
2013-08-05 14:17:46 +03:00
Arlo Breault
506a01bda8
Use size_t for length in replaycache_add_test_and_elapsed()
...
For consistency with the rest of buffer lengths in Tor.
See #8960
2013-08-04 09:29:22 -04:00
Peter Retzlaff
ebd4ab1506
Prepare patch for ticket 5129 for merging.
...
- Preserve old eventdns code.
- Add function to close sockets cross-platform, without accounting.
- Add changes/ file.
2013-08-02 09:35:24 -04:00
Nick Mathewson
83a859e24c
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-07-31 21:49:30 -04:00
Nick Mathewson
0a0f93d277
Merge remote-tracking branch 'arma/bug9354' into maint-0.2.4
2013-07-31 21:48:48 -04:00
George Kadianakis
5a5147dd2e
Fix invalid-read when a managed proxy configuration fails.
2013-07-31 13:56:07 -04:00
Nick Mathewson
904a58d10f
Merge branch 'bug9288_rebased'
...
Conflicts:
src/test/test_pt.c
2013-07-31 13:51:15 -04:00
Nick Mathewson
22a074caa7
Update pt/configure_proxy until it stops segfaulting
2013-07-31 13:34:16 -04:00
George Kadianakis
99bb6d2937
Modifications to transports.c for the unit tests to work.
...
Both 'managed_proxy_list' and 'unconfigured_proxies_n' are global
src/or/transports.c variables that are not initialized properly when
unit tests are run.
2013-07-31 13:34:16 -04:00
George Kadianakis
aaf79eb4d3
Write unit tests for configure_proxy().
2013-07-31 13:34:16 -04:00
George Kadianakis
6e40806025
Fix invalid-read when a managed proxy configuration fails.
2013-07-31 13:34:16 -04:00
Cristian Toader
871e5b35a8
small filter changes; openat as separate function
2013-07-30 19:25:56 +03:00
Roger Dingledine
ff6bb13c02
NumDirectoryGuards now tracks NumEntryGuards by default
...
Now a user who changes only NumEntryGuards will get the behavior she
expects. Fixes bug 9354; bugfix on 0.2.4.8-alpha.
2013-07-30 12:05:39 -04:00
Cristian Toader
8022def6f0
added openat parameter filter
2013-07-29 16:30:39 +03:00
Cristian Toader
8f9d3da194
Investigated access4 syscall problem, small changes to filter.
2013-07-26 19:53:05 +03:00
Nick Mathewson
d5a5a6a253
Allow {,k,kilo,m,mega,g,giga,t,tera}bit{,s} in torrc
...
Patch from CharlieB for ticket #9214
2013-07-26 16:07:11 +02:00
Nick Mathewson
221a0159b8
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-07-26 15:42:10 +02:00
Nick Mathewson
11f1b7d9df
Avoid assertion failure on unexepcted address family in DNS reply.
...
Fixes bug 9337; bugfix on 0.2.4.7-alpha.
2013-07-26 15:33:46 +02:00
Cristian Toader
626a2b23de
integrated context for dynamic filters
2013-07-25 14:08:02 +03:00
Cristian Toader
3dfe1c0639
initia stages of runtime dynamic filters
2013-07-25 13:25:20 +03:00
Nick Mathewson
5d4b5018be
Fix bug9309, and n_noncanonical count/continue code
...
When we moved channel_matches_target_addr_for_extend() into a separate
function, its sense was inverted from what one might expect, and we
didn't have a ! in one place where we should have.
Found by skruffy.
2013-07-23 05:16:56 -07:00
Cristian Toader
c15d09293b
added experimental support for open syscall path param
2013-07-23 14:01:53 +03:00
Nick Mathewson
1d2e8020b7
Fix bug9309, and n_noncanonical count/continue code
...
When we moved channel_matches_target_addr_for_extend() into a separate
function, its sense was inverted from what one might expect, and we
didn't have a ! in one place where we should have.
Found by skruffy.
2013-07-23 11:52:10 +02:00
Nick Mathewson
18845c5507
Initialize destroy_cell_queue.
...
Likely fix for the crash bug of #9296 , which was introduced through a
combination of #7912 and #8586 . Bugfix not in any released Tor.
2013-07-19 09:49:35 -04:00
Nick Mathewson
e1d3b44495
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-07-18 23:17:57 -04:00
Nick Mathewson
17a960734a
Merge remote-tracking branch 'public/bug9295_023' into maint-0.2.4
2013-07-18 23:17:05 -04:00
Nick Mathewson
5977435629
tmp
2013-07-18 23:08:36 -04:00
George Kadianakis
05306ad74f
Write extra-info bridge-ip-transports lines.
2013-07-18 14:59:57 -04:00
George Kadianakis
e765d6ed84
Make a channel getter method to retrieve transport names.
2013-07-18 14:59:57 -04:00
George Kadianakis
0ec4e5a698
Add transport information to the GeoIP database.
2013-07-18 14:59:57 -04:00