mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-27 12:56:09 -04:00
BUG/MINOR: dns: dns_connect_server must return -1 unsupported nameserver's type
This patch fix returns code in case of dns_connect_server is called on unsupported type (which should not happen). Doing this we have the warranty that after a return 0 the fd is never -1. This patch should fix github issues #1127, #1128 and #1130
This commit is contained in:
parent
538bb0441c
commit
526b79219e
1 changed files with 3 additions and 1 deletions
|
|
@ -75,8 +75,10 @@ static int dns_connect_nameserver(struct dns_nameserver *ns)
|
|||
dgram->t.sock.fd = fd;
|
||||
fd_insert(fd, dgram, dgram_fd_handler, MAX_THREADS_MASK);
|
||||
fd_want_recv(fd);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Sends a message to a name server
|
||||
|
|
|
|||
Loading…
Reference in a new issue