projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff13dad
)
DEV: tcploop: permit port 0 to ease handling of default options
author
Willy Tarreau
<w@1wt.eu>
Tue, 7 Jun 2022 10:06:04 +0000
(12:06 +0200)
committer
Willy Tarreau
<w@1wt.eu>
Wed, 8 Jun 2022 12:42:15 +0000
(14:42 +0200)
This will also be convenient when binding to an IP and no port.
dev/tcploop/tcploop.c
patch
|
blob
|
history
diff --git
a/dev/tcploop/tcploop.c
b/dev/tcploop/tcploop.c
index
ca984f7
..
1aebb88
100644
(file)
--- a/
dev/tcploop/tcploop.c
+++ b/
dev/tcploop/tcploop.c
@@
-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;
}