]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] acl: srv_id must return no match when the server is NULL
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2011 13:27:06 +0000 (14:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2011 14:32:15 +0000 (15:32 +0100)
Reported by HervĂ© Commowick, causes crashes when the server is not known.

src/backend.c

index bd207496b456f58baf9489353da27909ae90b6e9..c63bc3a71f23fd38ce5490f75901536e03431fc6 100644 (file)
@@ -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;