Nick Mathewson
a1096fe180
Use commandline parser for other options
...
These were previously allowed only in the initial position:
--help, -h , --version, --digests, --list-torrc-options
2013-09-13 12:36:39 -04:00
Nick Mathewson
34ec954f8e
Expose commandline parser so that we can use it for --quiet,etc.
...
Fix for bug 9578.
2013-09-13 12:36:39 -04:00
Cristian Toader
d98dfb3746
Patch for 4647 (rewrite command line parser)
2013-09-13 12:36:26 -04: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
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
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
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