Commit Graph

26439 Commits

Author SHA1 Message Date
George Kadianakis
b705cfa024 Merge remote-tracking branch 'tor-gitlab/mr/111' 2020-08-11 15:12:43 +03:00
George Kadianakis
f971a8fbad Merge branch 'mr/105' 2020-08-11 15:04:15 +03:00
Nick Mathewson
7df52b71bf Only log port self-testing message when we are _starting_ to test.
(Unlike approaches in earlier versions of Tor, this one logs if and
only if we are launching a test, and we haven't said that we're
testing this port.)

Fixes bug 40068; bug not in any released version.

Closes #40068.
2020-08-11 15:02:44 +03:00
George Kadianakis
b8003fbe99 Merge branch 'maint-0.4.4' 2020-08-11 14:54:26 +03:00
George Kadianakis
ab9c35f043 Merge remote-tracking branch 'tor-gitlab/mr/102' into maint-0.4.4 2020-08-11 14:53:03 +03:00
Nick Mathewson
069946852a Merge branch 'maint-0.4.4' 2020-08-10 19:33:07 -04:00
Nick Mathewson
7d80bf80fe Merge branch 'maint-0.4.3' into maint-0.4.4 2020-08-10 19:33:07 -04:00
Nick Mathewson
f3fcc89d05 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-08-10 19:33:06 -04:00
Nick Mathewson
68f8250cbb Merge branch 'maint-0.3.5' into maint-0.4.2 2020-08-10 19:32:49 -04:00
Nick Mathewson
e873c7e893 small code tweaks to try to work around debian stable complaints 2020-08-10 19:20:05 -04:00
Nick Mathewson
3eb9331133 Merge remote-tracking branch 'tor-gitlab/mr/110' 2020-08-10 14:51:12 -04:00
Nick Mathewson
b417594dbc Replace several C identifiers for ticket 18106.
We used to have a single boolean, "FascistFirewall".  Ages ago, in
tickets #17840 and #9067, we added an improved "ReachableAddresses"
mechanism.  It's time to rename related identifiers in the code for
consistency.  This closes #18106.

This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        fascist_firewall_allows_address reachable_addr_allows \
        fascist_firewall_use_ipv6 reachable_addr_use_ipv6 \
        fascist_firewall_prefer_ipv6_impl reachable_addr_prefer_ipv6_impl \
        fascist_firewall_prefer_ipv6_orport reachable_addr_prefer_ipv6_orport \
        fascist_firewall_prefer_ipv6_dirport reachable_addr_prefer_ipv6_dirport \
        fascist_firewall_allows_address_addr reachable_addr_allows_addr \
        fascist_firewall_allows_address_ap reachable_addr_allows_ap \
        fascist_firewall_allows_base reachable_addr_allows_base \
        fascist_firewall_allows_ri_impl reachable_addr_allows_ri_impl \
        fascist_firewall_allows_rs_impl reachable_addr_allows_rs_impl \
        fascist_firewall_allows_rs reachable_addr_allows_rs \
        fascist_firewall_allows_md_impl reachable_addr_allows_md_impl \
        fascist_firewall_allows_node reachable_addr_allows_node \
        fascist_firewall_allows_dir_server reachable_addr_allows_dir_server \
        fascist_firewall_choose_address_impl reachable_addr_choose_impl \
        fascist_firewall_choose_address reachable_addr_choose \
        fascist_firewall_choose_address_base reachable_addr_choose_base \
        fascist_firewall_choose_address_rs reachable_addr_choose_from_rs \
        fascist_firewall_choose_address_ls reachable_addr_choose_from_ls \
        fascist_firewall_choose_address_node reachable_addr_choose_from_node \
        fascist_firewall_choose_address_dir_server reachable_addr_choose_from_dir_server
2020-08-05 16:34:45 -04:00
George Kadianakis
afd88ee87f Merge remote-tracking branch 'tor-gitlab/mr/88' 2020-08-05 14:57:20 +03:00
Neel Chauhan
d1413e04f8 ipv6: Specialize GETINFO address interface for v4 and v6 2020-08-04 13:59:49 -07:00
Nick Mathewson
04926126ee Merge remote-tracking branch 'tor-gitlab/mr/100' 2020-08-04 13:28:51 -04:00
Daniel Pinto
ccdd0d801a Minor style improvements. #30045 2020-08-03 20:08:17 +01:00
Nick Mathewson
ea876ab00e Wipe address strings from connections before freeing them them.
This is a defense-in-depth fix; closes 6198.
2020-08-03 10:15:08 -04:00
Nick Mathewson
5b9508c9a5 Add a tor_str_wipe_and_free() function.
Frequently we want to do

    if (s) {
      memwipe(s, 0, sizeof(s));
      tor_free(s);
    }

and it's good to have a way to do this concisely.
2020-08-03 10:11:03 -04:00
George Kadianakis
e069b0af4b Merge branch 'maint-0.4.4' 2020-08-03 16:49:05 +03:00
George Kadianakis
18d2c7c5d7 Merge remote-tracking branch 'tor-gitlab/mr/79' into maint-0.4.4 2020-08-03 16:48:52 +03:00
Nick Mathewson
ce57404a42 Fix comment on protover_list_is_invalid 2020-08-03 08:57:21 -04:00
Nick Mathewson
efc969e862 Rename protover_contains_long_protocol_names to protover_list_is_invalid
This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        protover_contains_long_protocol_names protover_list_is_invalid
2020-08-03 08:55:17 -04:00
Nick Mathewson
d1fda62d11 Merge remote-tracking branch 'tor-gitlab/mr/94' 2020-08-03 08:54:03 -04:00
Nick Mathewson
3e3b0b0443 Merge remote-tracking branch 'tor-github/pr/1986/head' 2020-08-03 08:33:22 -04:00
Nick Mathewson
efe8a98817 Fix a leak-on-failure on test_get_bandwidth_lines()
Spotted by coverity. This is CID 1465571.
2020-08-01 09:29:08 -04:00
Daniel Pinto
1474ab3395 Add --format argument to --key-expiration option. #30045 2020-08-01 01:08:37 +01:00
Neel Chauhan
837e0c4dc9 Code simplifications for AP_CONN_STATE_CONTROLLER_WAIT 2020-07-31 09:21:43 -07:00
MrSquanchee
bb585c5e37
test_stats : Removed CONFIG_PRIVATE
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
2020-07-31 21:12:29 +05:30
MrSquanchee
a93c3d7a8d
Added tests for bandwidth functions
Added tests for
1. commit_max
2. advance_obs
3. add_obs
4. rep_hist_fill_bandwidth_history
5. rep_hist_get_bandwidth_lines

 (Lightly edited by nickm to use new names from bwhist refactoring.)

Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
2020-07-31 21:12:16 +05:30
MrSquanchee
708f51637f
Added tests for bandwidth functions
Added tests for
1. commit_max
2. advance_obs
3. add_obs
4. rep_hist_fill_bandwidth_history
5. rep_hist_get_bandwidth_lines

Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
2020-07-31 21:10:54 +05:30
Nick Mathewson
b5068e4826 Extract bw_array_t and related constants into a header.
This will be used for testing.

Partially reproduces work by MrSquanchee in #33812.
2020-07-31 10:46:52 -04:00
Alexander Færøy
e78a7450a2 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-31 02:03:34 +00:00
Alexander Færøy
4e684c8695 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-31 02:03:34 +00:00
Nick Mathewson
4c810a6abe Merge branch 'bug40076_044' 2020-07-30 14:35:06 -04:00
Nick Mathewson
b4400e2093 Merge branch 'bug40076_043' into bug40076_044 2020-07-30 14:28:11 -04:00
Nick Mathewson
69d7752937 Merge branch 'bug40076_042' into bug40076_043 2020-07-30 14:27:29 -04:00
Nick Mathewson
c2d5ec5e43 Merge branch 'maint-0.4.2' into bug40076_042 2020-07-30 14:27:29 -04:00
Nick Mathewson
c4742b89b2 Fix a bug in buf_move_all() when the input buffer is empty.
We found this in #40076, after we started using buf_move_all() in
more places.  Fixes bug #40076; bugfix on 0.3.3.1-alpha.  As far as
I know, the crash only affects master, but I think this warrants a
backport, "just in case".
2020-07-30 14:24:25 -04:00
Nick Mathewson
0a588821cb Add unit test for buf_move_all(), including a failing case
The failing case is #if'd out for now, but will be fixed in the next
commit.

Testing for a fix for #40076.
2020-07-30 14:19:32 -04:00
George Kadianakis
155e0dee49 Merge branch 'tor-gitlab/mr/84' 2020-07-30 19:49:25 +03:00
Nick Mathewson
219edc9ab1 Handle ORPort auto when logging about removed orports.
Closes #40075
2020-07-30 19:46:44 +03:00
George Kadianakis
2bb9acca73 Write unittest for #40065.
Make the unit test pass by including an explicit IPv6 port and an
implicit IPv4 port.  See comments for more details.
2020-07-30 19:46:39 +03:00
Nick Mathewson
fc5fe094b1 Fix segfault and logic error in remove_duplicate_orports()
This function tried to modify an array in place, but did it in a
pretty confusing and complicated way.  I've revised it to follow a
much more straightforward approach.

Fixes bug #40065.
2020-07-30 19:46:02 +03:00
Nick Mathewson
fcf4954cc8 Add a unit test for write_str_to_file_if_not_equal() 2020-07-30 10:46:15 -04:00
Nick Mathewson
f3e5b283ad test_util.c: Extract utime() function.
We need this to manipulate mtimes, but only in this file.
2020-07-30 10:46:15 -04:00
Neel Chauhan
67a62ccf51 Use write_str_if_not_equal() for onion services 2020-07-30 10:46:15 -04:00
Neel Chauhan
c212578bf0 Introduce write_str_if_not_equal() 2020-07-30 10:46:15 -04:00
Nick Mathewson
9164d7c75e Merge branch 'maint-0.4.4' 2020-07-29 12:37:08 -04:00
Nick Mathewson
3b8bf743ae Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-29 12:37:07 -04:00
Nick Mathewson
cdb0e6c252 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-29 12:37:07 -04:00