1 From 8c1b1be9e4f11a8474f64dcb85d507a57b6cfe9f Mon Sep 17 00:00:00 2001
2 From: Willy Tarreau <w@1wt.eu>
3 Date: Tue, 13 Aug 2013 17:19:08 +0200
4 Subject: [PATCH 7/9] MINOR: config: warn when a server with no specific port
7 Mathew Levett reported an issue which is a bit nasty and hard to track
8 down. RDP cookies contain both the IP and the port, and haproxy matches
9 them exactly. So if a server has no port specified (or a remapped port),
10 it will never match a port specified in a cookie. Better warn the user
11 when this is detected.
12 (cherry picked from commit 82ffa39bfd34e5680cb65cc0b7ef625c0a274856)
14 src/cfgparse.c | 6 ++++++
15 1 file changed, 6 insertions(+)
17 diff --git a/src/cfgparse.c b/src/cfgparse.c
18 index 7d349b3..cecec03 100644
21 @@ -5638,6 +5638,12 @@ out_uri_auth_compat:
25 + if ((newsrv->state & SRV_MAPPORTS) && (curproxy->options2 & PR_O2_RDPC_PRST)) {
26 + Warning("config : %s '%s' : RDP cookie persistence will not work for server '%s' because it lacks an explicit port number.\n",
27 + proxy_type_str(curproxy), curproxy->id, newsrv->id);
28 + err_code |= ERR_WARN;
31 #if defined(CONFIG_HAP_CTTPROXY) || defined(CONFIG_HAP_LINUX_TPROXY)
32 if (curproxy->mode != PR_MODE_HTTP && newsrv->bind_hdr_occ) {
33 newsrv->bind_hdr_occ = 0;