tor/src/test
David Goulet 45afb31e1c addr: Prioritize interface lookup over local hostname
The find_my_address() function now prioritize the local interface over the
local hostname when guessing the IP address.

See proposal 312, section 3.2.1, general case:
https://gitweb.torproject.org/torspec.git/tree/proposals/312-relay-auto-ipv6-addr.txt#n359

The entire unit tests had to be refactored to make this possible. Instead of
hot patching it, it has been rewritten to cover all possible cases and the
test interface has been changed to accomodate both IPv4 and IPv6 in order for
them to be tested identically.

Closes #33238

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-02 11:00:42 -04:00
..
conf_examples Improve logging of included config files 2020-05-08 01:10:59 +01:00
conf_failures test/parseconf: Add failure cases in conf_failures/ 2019-11-14 11:57:50 +10:00
fuzz Turn hs_subcredential_t into a proper struct. 2020-01-21 10:31:29 -05:00
.may_include practracker: Add missing .may_include files 2019-12-04 12:15:22 -05:00
bench.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
bt_test.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
ed25519_exts_ref.py Use print() function in both Python 2 and Python 3 2020-01-28 01:38:54 +01:00
ed25519_vectors.inc Don't double hash the ed25519 blind key parameter. 2017-08-08 20:29:34 -04:00
example_extrainfo.inc
failing_routerdescs.inc Sign extrainfo documents with ed25519 2015-05-28 10:42:22 -04:00
fakechans.h It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
fakecircs.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
fakecircs.h It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
fuzz_static_testcases.sh Fix shellcheck warning in fuzz_static_testcases.sh 2019-02-06 11:01:22 +02:00
hs_build_address.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
hs_indexes.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
hs_ntor_ref.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
hs_test_helpers.c Write unittest that covers cases of INTRODUCE1 handling. 2020-01-28 01:08:41 +02:00
hs_test_helpers.h Write unittest that covers cases of INTRODUCE1 handling. 2020-01-28 01:08:41 +02:00
include.am Add a test script to check subsystem order as part of make check. 2020-04-07 17:35:51 +10:00
log_test_helpers.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
log_test_helpers.h log_test_helpers: remove semicolons from end of macros 2020-02-06 14:54:04 -05:00
Makefile.nmake Circuit padding tests. 2019-01-02 15:25:55 +02:00
ntor_ref.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
ope_ref.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
opts_test_helpers.c Move get_foo_options() test helpers into a new test module. 2019-12-19 09:19:02 -05:00
opts_test_helpers.h Move get_foo_options() test helpers into a new test module. 2019-12-19 09:19:02 -05:00
prob_distr_mpfr_ref.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
ptr_helpers.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
ptr_helpers.h It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
rend_test_helpers.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
rend_test_helpers.h It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
resolve_test_helpers.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
resolve_test_helpers.h It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
rng_test_helpers.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
rng_test_helpers.h It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
rust_supp.txt Add a leak suppression for backtrace_alloc 2018-06-20 18:02:49 -04:00
slow_ed25519.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
slownacl_curve25519.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
sr_commit_calc_ref.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
sr_srv_calc_ref.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
test_accounting.c Remove all usage of the NS*() macros in test*.c 2020-01-09 11:09:22 -05:00
test_addr.c Make sure that we free 'addr' at the end of a pair of addr tests 2020-04-09 07:54:23 -04:00
test_address_set.c Merge branch 'ticket33029_042_01' into ticket33029_043_03 2020-02-11 10:30:29 -05:00
test_address.c node: Rename addrs_in_same_network_family() 2020-06-30 13:48:22 -04:00
test_bridges.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_bt_cl.c Merge branch 'pre_formatter_cleanups_squashed' 2020-01-09 07:32:39 -05:00
test_bt.sh Use setrlimit instead of ulimit -c in backtrace tests 2019-02-20 12:06:26 -05:00
test_btrack.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_buffers.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_bwmgt.c Merge branch 'ticket33029_042_01' into ticket33029_043_03 2020-02-11 10:30:29 -05:00
test_cell_formats.c test/cell_formats: Expand the IPv6-only EXTEND2 test 2020-04-29 22:43:09 +10:00
test_cell_queue.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_channel.c relay/circuitbuild: Re-use IPv6 connections for circuits 2020-04-29 22:43:09 +10:00
test_channelpadding.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_channeltls.c addr: Rename resolved_addr_is_local() 2020-06-24 13:51:37 -04:00
test_checkdir.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_circuitbuild.c Add circuit_extend_add_ipv(4/6)_helper() test 2020-06-22 15:33:03 -04:00
test_circuitlist.c Merge branch 'pre_formatter_cleanups_squashed' 2020-01-09 07:32:39 -05:00
test_circuitmux_ewma.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_circuitmux.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_circuitpadding.c Bug 30992: Update tests 2020-06-10 15:37:44 +03:00
test_circuitstats.c test: Move the origin circuit function to test helpers 2020-05-14 10:44:56 +10:00
test_circuituse.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_cmdline.sh test/scripts: Use the same code to find the tor binary 2019-11-05 11:07:31 +10:00
test_compat_libevent.c Remove all usage of the NS*() macros in test*.c 2020-01-09 11:09:22 -05:00
test_config.c addr: Prioritize interface lookup over local hostname 2020-07-02 11:00:42 -04:00
test_confmgr.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_confparse.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_connection.c Break CONNECTION_TESTCAE_ARG across multiple lines 2020-02-06 17:21:34 -05:00
test_connection.h Change starting file descriptor for tests. 2020-04-03 16:47:38 +07:00
test_conscache.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_consdiff.c log_test_helpers: remove semicolons from end of macros 2020-02-06 14:54:04 -05:00
test_consdiffmgr.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_containers.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_controller_events.c Merge branch 'bug33104_041' 2020-02-10 14:23:13 -05:00
test_controller.c test: Rename test_rep_hist to test_stats 2020-07-01 12:31:40 -04:00
test_crypto_ope.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_crypto_openssl.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_crypto_rng.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_crypto_slow.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_crypto.c Merge branch 'maint-0.4.2' into maint-0.4.3 2020-03-17 15:22:36 -04:00
test_data.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_descriptors.inc
test_dir_common.c Move voting_schedule.[ch] to src/feature/dirauth/ 2020-02-24 10:00:51 -05:00
test_dir_common.h It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_dir_handle_get.c Rename voting_schedule_*() functions. 2020-02-24 10:07:09 -05:00
test_dir.c Run "make autostyle" 2020-04-29 22:08:33 +10:00
test_dispatch.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_dns.c Replace identifiers related to clipping DNS ttls. 2020-02-18 12:00:24 -05:00
test_dos.c Merge branch 'maint-0.4.2' into maint-0.4.3 2020-04-09 11:03:34 +10:00
test_entryconn.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_entrynodes.c Fix and update unittests. 2020-06-11 16:13:20 +03:00
test_extorport.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_geoip.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_guardfraction.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_handles.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_helpers.c circuitbuild: test relays sending IPv6 extend cells 2020-05-14 21:15:16 +10:00
test_helpers.h test: Move the origin circuit function to test helpers 2020-05-14 10:44:56 +10:00
test_hs_cache.c Merge remote-tracking branch 'tor-github/pr/1685/head' 2020-02-24 07:45:20 -05:00
test_hs_cell.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_hs_client.c Merge branch 'maint-0.4.3' 2020-04-13 14:14:41 -04:00
test_hs_common.c Rename voting_schedule_*() functions. 2020-02-24 10:07:09 -05:00
test_hs_config.c Update expected log messages in tests to new format. 2020-03-30 13:31:44 -04:00
test_hs_control.c Consistently use 'address' in Invalid v3 address responses to ONION_CLIENT_AUTH commands 2020-06-22 14:56:07 -04:00
test_hs_descriptor.c Merge branch 'maint-0.4.3' 2020-03-30 13:38:58 -04:00
test_hs_descriptor.inc Add unittest for #23233. 2017-08-21 19:16:30 +03:00
test_hs_dos.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_hs_intropoint.c Run "make autostyle" 2020-04-29 22:08:33 +10:00
test_hs_ntor_cl.c Turn hs_subcredential_t into a proper struct. 2020-01-21 10:31:29 -05:00
test_hs_ntor.c Turn hs_subcredential_t into a proper struct. 2020-01-21 10:31:29 -05:00
test_hs_ntor.sh test: Fix a comment typo in src/test/test_hs_ntor.sh 2019-10-31 00:43:13 +10:00
test_hs_ob.c Final touches to #32709 based on Nick's feedback. 2020-02-24 12:15:35 +02:00
test_hs_service.c Fix typo in test_build_update_descriptors() comment 2020-06-17 20:12:13 -07:00
test_hs.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_introduce.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_key_expiration.sh test/scripts: Use the same code to find the tor binary 2019-11-05 11:07:31 +10:00
test_keygen.sh test/scripts: Use the same code to find the tor binary 2019-11-05 11:07:31 +10:00
test_keypin.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_link_handshake.c Move relay_handshake.[ch] into src/feature/relay, and make it optional 2020-02-20 10:41:06 -05:00
test_logging.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_mainloop.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_microdesc.c Merge branch 'pre_formatter_cleanups_squashed' 2020-01-09 07:32:39 -05:00
test_namemap.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_netinfo.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_nodelist.c test/nodelist: Remove ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD 2020-01-20 15:51:30 +10:00
test_ntor_cl.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_ntor.sh
test_oom.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_oos.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_options_act.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_options.c Merge branch 'ticket33361_035_01_squashed' into maint-0.4.3 2020-03-12 13:42:42 -04:00
test_parsecommon.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_parseconf.sh test/parseconf: Warn when the expected_log* file is missing 2019-11-14 12:57:59 +10:00
test_pem.c Merge branch 'bug33032_042' into bug33032_043 2020-03-11 10:35:47 -04:00
test_periodic_event.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_policy.c Merge branch 'tor-github/pr/1778' 2020-03-19 17:16:00 +02:00
test_prob_distr.c prob_distr: use "clang-format off" to avoid wide lines for URLs 2020-02-06 14:33:05 -05:00
test_process_descs.c Merge branch 'ticket32672_042_squashed_w_test' into maint-0.4.3 2020-03-16 12:21:49 -04:00
test_process_slow.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_process.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_procmon.c Remove all usage of the NS*() macros in test*.c 2020-01-09 11:09:22 -05:00
test_proto_haproxy.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_proto_http.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_proto_misc.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_protover.c Merge branch 'tor-github/pr/1939' 2020-06-24 17:22:53 +03:00
test_pt.c Use parentheses to avoid mis-indentations of stringified macro args 2020-02-06 14:54:04 -05:00
test_ptr_slow.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_pubsub_build.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_pubsub_msg.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_rebind.py python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
test_rebind.sh test/scripts: Use the same code to find the tor binary 2019-11-05 11:07:31 +10:00
test_relay.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_relaycell.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_relaycrypt.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_rendcache.c Fix wide lines from NS() removal fallout. 2020-01-09 11:43:49 -05:00
test_replay.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_rng.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_router.c Merge branch 'bug32588_042' into bug32588_043 2020-03-21 04:01:00 +10:00
test_routerkeys.c Add test for fingerprint-ed25519 file 2020-06-25 13:35:15 -04:00
test_routerlist.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_routerset.c Add routerset_contains_router() test 2020-06-24 13:38:27 -04:00
test_rust.sh Let's not double-quote EXTRA_CARGO_OPTIONS after all 2019-02-13 15:04:12 +02:00
test_scheduler.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_sendme.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_shared_random.c Stop using all dirauth-only options in shared_random_client.c 2020-03-03 14:35:01 +02:00
test_slow.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_socks.c Use __attribute__((fallthrough)) rather than magic GCC comments. 2020-05-06 16:55:25 -04:00
test_stats.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_status.c Fix wide lines from NS() removal fallout. 2020-01-09 11:43:49 -05:00
test_storagedir.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_switch_id.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_switch_id.sh Fix shellcheck SC2006 warnings in test_switch_id.sh 2019-02-24 17:02:06 -05:00
test_threads.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_token_bucket.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_tortls_openssl.c Remove all usage of the NS*() macros in test*.c 2020-01-09 11:09:22 -05:00
test_tortls.c Remove all usage of the NS*() macros in test*.c 2020-01-09 11:09:22 -05:00
test_tortls.h It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_util_format.c Remove all usage of the NS*() macros in test*.c 2020-01-09 11:09:22 -05:00
test_util_process.c Run "make autostyle" 2020-03-17 18:19:04 +10:00
test_util.c Merge branch 'tor-github/pr/1775' 2020-03-30 13:31:56 -04:00
test_voting_flags.c Merge branch 'ticket32806' 2020-01-17 08:37:33 -05:00
test_voting_schedule.c Rename voting_schedule_*() functions. 2020-02-24 10:07:09 -05:00
test_workqueue_cancel.sh Fix SC2086 warning in test_workqueue_*.sh shell scripts 2019-02-08 16:51:49 +02:00
test_workqueue_efd2.sh Fix SC2086 warning in test_workqueue_*.sh shell scripts 2019-02-08 16:51:49 +02:00
test_workqueue_efd.sh Fix SC2086 warning in test_workqueue_*.sh shell scripts 2019-02-08 16:51:49 +02:00
test_workqueue_pipe2.sh Fix SC2086 warning in test_workqueue_*.sh shell scripts 2019-02-08 16:51:49 +02:00
test_workqueue_pipe.sh Fix SC2086 warning in test_workqueue_*.sh shell scripts 2019-02-08 16:51:49 +02:00
test_workqueue_socketpair.sh Fix SC2086 warning in test_workqueue_*.sh shell scripts 2019-02-08 16:51:49 +02:00
test_workqueue.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_x509.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test_zero_length_keys.sh test/scripts: Use the same code to find the tor binary 2019-11-05 11:07:31 +10:00
test-memwipe.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test-network.sh Remove no-longer needed logging statements 2019-04-02 12:59:37 +03:00
test-process.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test-timers.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
test.c test: Add HS onion balance tests 2020-01-21 10:31:29 -05:00
test.h test: Add HS onion balance tests 2020-01-21 10:31:29 -05:00
testing_common.c Merge branch 'maint-0.4.3' 2020-03-20 11:25:04 +10:00
testing_rsakeys.c It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
vote_descriptors.inc
zero_length_keys.sh Merge branch 'maint-0.4.0' 2019-05-29 21:20:02 +03:00