]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: frontend: Always access the stream-int via the conn-stream
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Dec 2021 12:33:59 +0000 (13:33 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Feb 2022 10:00:02 +0000 (11:00 +0100)
To be able to move the stream-interface from the stream to the conn-stream,
all access to the SI is done via the conn-stream. This patch is limited to
the frontend part.

src/frontend.c

index 1016a1b862de1ddbe865cc0b5eabc529b18a976a..c8fb3d2ba237e7cfe2277b9aab8296f3b370d8eb 100644 (file)
@@ -62,7 +62,7 @@ int frontend_accept(struct stream *s)
                                        s->do_log(s);
                }
                else if (conn) {
-                       src = si_src(&s->si[0]);
+                       src = si_src(cs_si(s->csf));
                        if (!src)
                                send_log(fe, LOG_INFO, "Connect from unknown source to listener %d (%s/%s)\n",
                                         l->luid, fe->id, (fe->mode == PR_MODE_HTTP) ? "HTTP" : "TCP");
@@ -73,7 +73,7 @@ int frontend_accept(struct stream *s)
                                switch (addr_to_str(src, pn, sizeof(pn))) {
                                case AF_INET:
                                case AF_INET6:
-                                       dst = si_dst(&s->si[0]);
+                                       dst = si_dst(cs_si(s->csf));
                                        if (dst) {
                                                addr_to_str(dst, sn, sizeof(sn));
                                                port = get_host_port(dst);
@@ -113,7 +113,7 @@ int frontend_accept(struct stream *s)
                        }
                }
 
-               src = si_src(&s->si[0]);
+               src = si_src(cs_si(s->csf));
                if (!src) {
                        chunk_printf(&trash, "%08x:%s.accept(%04x)=%04x from [listener:%d] ALPN=%s\n",
                                     s->uniq_id, fe->id, (unsigned short)l->rx.fd, (unsigned short)conn->handle.fd,