aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-25 13:45:36 -0500
committerNick Mathewson <nickm@torproject.org>2012-12-17 14:48:09 -0500
commitf33487668f16dbd7f95eaf8644865c28e1dd7036 (patch)
treebde45b532fddf7d355561ff67ca7af1e98f0309f /src/test/test_config.c
parent32219d83134c861abad5a7d37f93f3ec4b492398 (diff)
downloadtor-f33487668f16dbd7f95eaf8644865c28e1dd7036.tar
tor-f33487668f16dbd7f95eaf8644865c28e1dd7036.tar.gz
Implement option to turn off DNS cache use on a client port
(This is part 2 of making DNS cache use enabled/disabled on a per-client port basis. This implements the CacheIPv[46]DNS options, but not the UseCachedIPv[46] ones.)
Diffstat (limited to 'src/test/test_config.c')
-rw-r--r--src/test/test_config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_config.c b/src/test/test_config.c
index e04b9dfc2..9f6b260fe 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -42,6 +42,11 @@ test_config_addressmap(void *arg)
config_get_lines(buf, &(get_options_mutable()->AddressMap), 0);
config_register_addressmaps(get_options());
+/* Use old interface for now, so we don't need to rewrite the unit tests */
+#define addressmap_rewrite(a,s,eo,ao) \
+ addressmap_rewrite((a),(s),AMR_FLAG_USE_IPV4_DNS|AMR_FLAG_USE_IPV6_DNS, \
+ (eo),(ao))
+
/* MapAddress .invalidwildcard.com .torserver.exit - no match */
strlcpy(address, "www.invalidwildcard.com", sizeof(address));
test_assert(!addressmap_rewrite(address, sizeof(address), &expires, NULL));
@@ -158,6 +163,8 @@ test_config_addressmap(void *arg)
strlcpy(address, "www.torproject.org", sizeof(address));
test_assert(!addressmap_rewrite(address, sizeof(address), &expires, NULL));
+#undef addressmap_rewrite
+
done:
;
}