Cristian Toader
ed4968315e
fix: sandbox_intern_string log clean up
2013-08-21 13:43:44 +03:00
Cristian Toader
8aa5517ff6
fix: flock filter update
2013-08-21 13:38:00 +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
71612f00ae
fixed openssl open syscall, fixed sandbox_getaddrinfo
2013-08-20 13:10:07 +03:00
Cristian Toader
36aeca0ecf
fix for getaddrinfo open syscall
2013-08-19 13:56:50 +03:00
Cristian Toader
a9910d89f1
finalised fix on libevent open string issue
2013-08-19 11:41:46 +03:00
Nick Mathewson
28485d33ca
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-08-16 22:00:14 -04:00
Nick Mathewson
edaea773e5
Document the correct loglevel for the heartbeat message
2013-08-16 21:59:41 -04:00
Cristian Toader
c09b11b6d8
updated filters
2013-08-16 01:43:09 +03:00
Nick Mathewson
ca6949ebea
Add a changes file for 9108.
2013-08-15 15:51: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
George Kadianakis
1743144c34
Add changes file for #4773 .
2013-08-15 12:16:31 -04:00
Nick Mathewson
172a55d9d6
Fix a wide line in test_geoip_with_pt
2013-08-15 12:10:10 -04:00
Nick Mathewson
74262f1571
Merge branch 'bug5040_4773_rebase_3'
2013-08-15 12:04:56 -04:00
George Kadianakis
c5269a59b0
Test ExtORPort cookie initialization when file writing is broken.
2013-08-15 12:03:38 -04:00
George Kadianakis
94db455472
Test some fail conditions of ext_orport.c USERADDR/TRANSPORT parsing.
2013-08-15 12:03:38 -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
636aeb1f24
Test for initializing ext_or_auth_cookie file
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
4e868a9bc3
Unit test for the ext_orport safe_cookie handshake
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
fd6749203e
More unit tests for handle_client_auth_nonce
...
Incidentally, this business here where I make crypto_rand mockable:
this is exactly the kind of thing that would make me never want to
include test-support stuff in production builds.
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
7a12cbc03d
Split out buffers and socks tests into separate modules.
...
No other changes were made here. Keeping everything in
src/test/test.c was a legacy of back when we had all our unit tests in
one big file.
Doing this now because I'm adding an ext_or_command test.
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
85c556a4c2
Trivially change unittests to make them more readable.
...
Pluggable transport names are now in alphabetical order like they
appear in the bridge-ip-transports string.
2013-08-15 12:03:34 -04:00
George Kadianakis
b2c7379aec
Make check-spaces happy.
2013-08-15 12:03:34 -04:00
George Kadianakis
4d32518288
Add a changes file for #5040 .
2013-08-15 12:03:34 -04:00
George Kadianakis
f8a9591d31
Fix some unittests that broke when we added bridge-ip-transports.
2013-08-15 12:03:33 -04:00
George Kadianakis
f4b36bee7e
Add a unittest for the bridge-ip-transports extra-info line.
2013-08-15 12:03:33 -04:00
Cristian Toader
863dd4d4b3
received feedback and fixed (partly) the socket filters
2013-08-15 00:23:51 +03:00