From: Olivier Houchard Date: Thu, 20 Apr 2017 16:21:17 +0000 (+0200) Subject: BUG/MINOR: server: don't use "proxy" when px is really meant. X-Git-Tag: v1.8-dev2~70 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=7d8e6889536f38c00e70c4187397d1c4d009aeae;p=haproxy-3.0.git BUG/MINOR: server: don't use "proxy" when px is really meant. In server_parse_sni_expr(), we use the "proxy" global variable, when we should probably be using "px" given as an argument. It happens to work by accident right now, but may not in the future. [wt: better backport it] --- diff --git a/src/server.c b/src/server.c index 878293f..a151fd4 100644 --- a/src/server.c +++ b/src/server.c @@ -1539,10 +1539,10 @@ static int server_parse_sni_expr(struct server *newsrv, struct proxy *px, char * }; idx = 0; - proxy->conf.args.ctx = ARGC_SRV; + px->conf.args.ctx = ARGC_SRV; expr = sample_parse_expr((char **)args, &idx, px->conf.file, px->conf.line, - err, &proxy->conf.args); + err, &px->conf.args); if (!expr) { memprintf(err, "error detected while parsing sni expression : %s", *err); return ERR_ALERT | ERR_FATAL;