]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: don't use "proxy" when px is really meant.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 20 Apr 2017 16:21:17 +0000 (18:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 Apr 2017 17:51:10 +0000 (19:51 +0200)
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]

src/server.c

index 878293fca35278f986dec7b730662ad348eae9f8..a151fd4cfc010296f1d7501e008c6d7176f05836 100644 (file)
@@ -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;