From: Willy Tarreau Date: Wed, 23 Feb 2011 13:27:06 +0000 (+0100) Subject: [BUG] acl: srv_id must return no match when the server is NULL X-Git-Tag: v1.5-dev8~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17af419a01d9f0d4f1cd6ce97cbe757e54b31558;p=thirdparty%2Fhaproxy.git [BUG] acl: srv_id must return no match when the server is NULL Reported by Hervé Commowick, causes crashes when the server is not known. --- diff --git a/src/backend.c b/src/backend.c index bd207496b4..c63bc3a71f 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1403,6 +1403,9 @@ static int acl_fetch_srv_id(struct proxy *px, struct session *l4, void *l7, int dir, struct acl_expr *expr, struct acl_test *test) { + if (!l4->srv) + return 0; + test->flags = ACL_TEST_F_READ_ONLY; test->i = l4->srv->puid;