summaryrefslogtreecommitdiff
path: root/lib/hostip.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-05-05 17:08:22 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-05-16 23:04:40 +0200
commitf1dd0282fb1e8aff85dbfe2ab4741867fdba1b89 (patch)
treeef2ac5047972450e69a6bc8bdcd8cd3c6c1698d5 /lib/hostip.c
parentae6adf4312b927d806f7c244e6f8bda5b5edd639 (diff)
downloadcurl-f1dd0282fb1e8aff85dbfe2ab4741867fdba1b89.tar.gz
hostip: CURL_DISABLE_SHUFFLE_DNS
Diffstat (limited to 'lib/hostip.c')
-rw-r--r--lib/hostip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index ed00ad5b9..cf33ed8f4 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -334,9 +334,9 @@ Curl_fetch_addr(struct connectdata *conn,
return dns;
}
+#ifndef CURL_DISABLE_SHUFFLE_DNS
UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
Curl_addrinfo **addr);
-
/*
* Curl_shuffle_addr() shuffles the order of addresses in a 'Curl_addrinfo'
* struct by re-linking its linked list.
@@ -401,6 +401,7 @@ UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
}
return result;
}
+#endif
/*
* Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache.
@@ -422,12 +423,14 @@ Curl_cache_addr(struct Curl_easy *data,
struct Curl_dns_entry *dns;
struct Curl_dns_entry *dns2;
+#ifndef CURL_DISABLE_SHUFFLE_DNS
/* shuffle addresses if requested */
if(data->set.dns_shuffle_addresses) {
CURLcode result = Curl_shuffle_addr(data, &addr);
if(result)
return NULL;
}
+#endif
/* Create a new cache entry */
dns = calloc(1, sizeof(struct Curl_dns_entry));