diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-08 18:02:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-13 12:41:15 -0500 |
commit | 9d0fab9872807ef212fadb3feb299cf6309a185f (patch) | |
tree | e7dcafceb46a841cfe1fe67da22b747ebe3aa675 /src/test/test_entryconn.c | |
parent | ab6bd78eca0f3edc7ed910d8567c409fe3dfdd92 (diff) | |
download | tor-9d0fab9872807ef212fadb3feb299cf6309a185f.tar.gz tor-9d0fab9872807ef212fadb3feb299cf6309a185f.zip |
Allow MapAddress and Automap to work together
The trick here is to apply mapaddress first, and only then apply
automapping. Otherwise, the automap checks don't get done.
Fix for bug 7555; bugfix on all versions of Tor supporting both
MapAddress and AutoMap.
Diffstat (limited to 'src/test/test_entryconn.c')
-rw-r--r-- | src/test/test_entryconn.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/test_entryconn.c b/src/test/test_entryconn.c index fefd2eaf00..0d0f2b0b5e 100644 --- a/src/test/test_entryconn.c +++ b/src/test/test_entryconn.c @@ -643,7 +643,6 @@ test_entryconn_rewrite_mapaddress_automap_onion(void *arg) connection_free_(ENTRY_TO_CONN(ec4)); } -#if 0 /* This fails because of #7555 */ /* This time is the same, but we start with a mapping from a non-onion * address. */ @@ -654,6 +653,7 @@ test_entryconn_rewrite_mapaddress_automap_onion2(void *arg) entry_connection_t *ec2 = NULL; entry_connection_t *ec3 = NULL; rewrite_result_t rr; + char *msg = NULL; ec2 = entry_connection_new(CONN_TYPE_AP, AF_INET); ec3 = entry_connection_new(CONN_TYPE_AP, AF_INET); @@ -662,6 +662,7 @@ test_entryconn_rewrite_mapaddress_automap_onion2(void *arg) get_options_mutable()->AllowDotExit = 1; smartlist_add(get_options_mutable()->AutomapHostsSuffixes, tor_strdup(".onion")); + parse_virtual_addr_network("192.168.0.0/16", AF_INET, 0, &msg); config_line_append(&get_options_mutable()->AddressMap, "MapAddress", "irc.example.com abcdefghijklmnop.onion"); config_register_addressmaps(get_options()); @@ -708,7 +709,6 @@ test_entryconn_rewrite_mapaddress_automap_onion2(void *arg) connection_free_(ENTRY_TO_CONN(ec2)); connection_free_(ENTRY_TO_CONN(ec3)); } -#endif #define REWRITE(name) \ { #name, test_entryconn_##name, TT_FORK, &test_rewrite_setup, NULL } @@ -727,10 +727,8 @@ struct testcase_t entryconn_tests[] = { REWRITE(rewrite_automap_exit), REWRITE(rewrite_mapaddress_exit), REWRITE(rewrite_mapaddress_automap_onion), - /* - This fails because of #7555 REWRITE(rewrite_mapaddress_automap_onion2), - */ + END_OF_TESTCASES }; |