mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-10 09:12:48 +02:00
MINOR: standard: Disable ip resolution during the runtime
The function str2net runs DNS resolution if valid ip cannot be parsed. The DNS function used is the standard function of the libc and it performs asynchronous request. The asynchronous request is not compatible with the haproxy archictecture. str2net() is used during the runtime throught the "socket". This patch remove the DNS resolution during the runtime.
This commit is contained in:
committed by
Willy Tarreau
parent
94580c9f52
commit
fc7ac7b89c
@@ -405,7 +405,8 @@ int pat_parse_dotted_ver(const char *text, struct pattern *pattern, char **err)
|
||||
*/
|
||||
int pat_parse_ip(const char *text, struct pattern *pattern, char **err)
|
||||
{
|
||||
if (str2net(text, &pattern->val.ipv4.addr, &pattern->val.ipv4.mask)) {
|
||||
if (str2net(text, global.mode & MODE_STARTING,
|
||||
&pattern->val.ipv4.addr, &pattern->val.ipv4.mask)) {
|
||||
pattern->type = SMP_T_IPV4;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user