From 6e4835c795996ee92ac1aa78733f23a089f310a5 Mon Sep 17 00:00:00 2001 From: Jason Glasgow Date: Fri, 4 Nov 2011 16:48:05 -0400 Subject: CURLOPT_INTERFACE: avoid resolving interfaces names Do not try to resolve interfaces names via DNS by recognizing interface names in a few ways. If the interface option argument has a prefix of "if!" then treat the argument as only an interface. Similarly, if the interface argument is the name of an interface (even if it does not have an IP address assigned), treat it as an interface name. Finally, if the interface argument is prefixed by "host!" treat it as a hostname that must be resolved by /etc/hosts or DNS. These changes allow a client using the multi interfaces to avoid blocking on name resolution if the interface loses its IP address or disappears. --- lib/if2ip.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index cdf2638ae..678e3a556 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -23,6 +23,7 @@ ***************************************************************************/ #include "setup.h" +extern bool Curl_if_is_interface_name(const char *interface); extern char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size); #ifdef __INTERIX -- cgit v1.2.1