mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
BUG/MINOR: server: report correct error message for invalid port on "socks4"
The socks4 keyword parser was a bit too much copy-pasted, it only checks for a null port and reports "invalid range". Let's properly check for the 1-65535 range and report the correct error. It may be backported everywhere "socks4" is present (2.0).
This commit is contained in:
parent
e1c0e6921b
commit
9743f709d0
1 changed files with 2 additions and 2 deletions
|
|
@ -877,8 +877,8 @@ static int srv_parse_socks4(char **args, int *cur_arg,
|
|||
goto err;
|
||||
}
|
||||
|
||||
if (!port_low) {
|
||||
ha_alert("'%s': invalid port range %d-%d.\n", args[*cur_arg], port_low, port_high);
|
||||
if (port_low <= 0 || port_low > 65535) {
|
||||
ha_alert("'%s': invalid port %d.\n", args[*cur_arg], port_low);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue