]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: add ::1 to predefined LOCALHOST acl
authorBjörn Jacke <bjacke@samba.org>
Fri, 15 Oct 2021 14:32:15 +0000 (16:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 18 Oct 2021 05:21:28 +0000 (07:21 +0200)
The "LOCALHOST" ACL currently matches only 127.0.0.1/8. This adds the
IPv6 "::1" address to the supported patterns.

doc/configuration.txt
src/acl.c

index db6656c7d21ff379b9eb8a31c7f1759ae237c740..b0a79bfb4d44b0de642500abbd4e658f3c0857c6 100644 (file)
@@ -20557,7 +20557,7 @@ HTTP_CONTENT     req.hdr_val(content-length) gt 0   match an existing content-le
 HTTP_URL_ABS     url_reg ^[^/:]*://                 match absolute URL with scheme
 HTTP_URL_SLASH   url_beg /                          match URL beginning with "/"
 HTTP_URL_STAR    url     *                          match URL equal to "*"
-LOCALHOST        src 127.0.0.1/8                    match connection from local host
+LOCALHOST        src 127.0.0.1/8 ::1                match connection from local host
 METH_CONNECT     method  CONNECT                    match HTTP CONNECT method
 METH_DELETE      method  DELETE                     match HTTP DELETE method
 METH_GET         method  GET HEAD                   match HTTP GET or HEAD method
index 6d11a0b35e17a3a70444d86ed7ccf0d08fe4b11b..480dd11a8c621b8aba991beca46e9740e2621d0a 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -754,7 +754,7 @@ const struct {
 } default_acl_list[] = {
        { .name = "TRUE",           .expr = {"always_true",""}},
        { .name = "FALSE",          .expr = {"always_false",""}},
-       { .name = "LOCALHOST",      .expr = {"src","127.0.0.1/8",""}},
+       { .name = "LOCALHOST",      .expr = {"src","127.0.0.1/8","::1",""}},
        { .name = "HTTP",           .expr = {"req.proto_http",""}},
        { .name = "HTTP_1.0",       .expr = {"req.ver","1.0",""}},
        { .name = "HTTP_1.1",       .expr = {"req.ver","1.1",""}},