mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-14 17:37:46 +00:00
DEV: tcploop: permit port 0 to ease handling of default options
This will also be convenient when binding to an IP and no port.
This commit is contained in:
parent
ff13dadaa5
commit
cb284c7a62
@ -248,7 +248,7 @@ int addr_to_ss(const char *str, struct sockaddr_storage *ss, struct err_msg *err
|
||||
*/
|
||||
if ((port_str = strrchr(str, ':')) == NULL) {
|
||||
port = atoi(str);
|
||||
if (port <= 0 || port > 65535) {
|
||||
if (port < 0 || port > 65535) {
|
||||
err->len = snprintf(err->msg, err->size, "Missing/invalid port number: '%s'\n", str);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user