mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-17 02:56:51 +00:00
MINOR: config: warn when a server with no specific port uses rdp-cookie
Mathew Levett reported an issue which is a bit nasty and hard to track down. RDP cookies contain both the IP and the port, and haproxy matches them exactly. So if a server has no port specified (or a remapped port), it will never match a port specified in a cookie. Better warn the user when this is detected.
This commit is contained in:
parent
380110368e
commit
82ffa39bfd
@ -6885,6 +6885,12 @@ out_uri_auth_compat:
|
|||||||
err_code |= ERR_WARN;
|
err_code |= ERR_WARN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((newsrv->state & SRV_MAPPORTS) && (curproxy->options2 & PR_O2_RDPC_PRST)) {
|
||||||
|
Warning("config : %s '%s' : RDP cookie persistence will not work for server '%s' because it lacks an explicit port number.\n",
|
||||||
|
proxy_type_str(curproxy), curproxy->id, newsrv->id);
|
||||||
|
err_code |= ERR_WARN;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_HAP_CTTPROXY) || defined(CONFIG_HAP_TRANSPARENT)
|
#if defined(CONFIG_HAP_CTTPROXY) || defined(CONFIG_HAP_TRANSPARENT)
|
||||||
if (curproxy->mode != PR_MODE_HTTP && newsrv->conn_src.bind_hdr_occ) {
|
if (curproxy->mode != PR_MODE_HTTP && newsrv->conn_src.bind_hdr_occ) {
|
||||||
newsrv->conn_src.bind_hdr_occ = 0;
|
newsrv->conn_src.bind_hdr_occ = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user