mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-18 11:40:50 +00:00
BUG/MINOR: backend: only match IPv4 addresses with RDP cookies
The RDP cookie extractor compares the 32-bit address from the request to the address of each server in the farm without first checking that the server's address is IPv4. This is a leftover from the IPv4 to IPv6 conversion. It's harmless as it's unlikely that IPv4 and IPv6 servers will be mixed in an RDP farm, but better fix it. This patch does not need to be backported.
This commit is contained in:
parent
acf3bf94d0
commit
28e9d06201
@ -1239,7 +1239,8 @@ int tcp_persist_rdp_cookie(struct session *s, struct channel *req, int an_bit)
|
||||
|
||||
s->target = NULL;
|
||||
while (srv) {
|
||||
if (memcmp(&addr, &(srv->addr), sizeof(addr)) == 0) {
|
||||
if (srv->addr.ss_family == AF_INET &&
|
||||
memcmp(&addr, &(srv->addr), sizeof(addr)) == 0) {
|
||||
if ((srv->state & SRV_RUNNING) || (px->options & PR_O_PERSIST)) {
|
||||
/* we found the server and it is usable */
|
||||
s->flags |= SN_DIRECT | SN_ASSIGNED;
|
||||
|
Loading…
Reference in New Issue
Block a user