MEDIUM: checks: only complain about the missing port when the check uses TCP

For UNIX socket addresses, we don't need any port, so let's disable the
check under this condition.
This commit is contained in:
Willy Tarreau 2014-05-09 23:59:19 +02:00
parent 47f48c4247
commit 5cf0b52d29

View File

@ -1072,9 +1072,11 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
}
/*
* We need at least a service port, a check port or the first tcp-check rule must
* be a 'connect' one
* be a 'connect' one when checking an IPv4/IPv6 server.
*/
if (!newsrv->check.port) {
if (!newsrv->check.port &&
(is_inet_addr(&newsrv->check_common.addr) ||
(!is_addr(&newsrv->check_common.addr) && is_inet_addr(&newsrv->addr)))) {
struct tcpcheck_rule *n = NULL, *r = NULL;
struct list *l;