]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tcp-act: Always access the stream-int via the conn-stream
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Dec 2021 12:59:47 +0000 (13:59 +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 tcp-act part.

src/tcp_act.c

index b85cf28da6895e33d175a7682bc44b8e5fea7187..a2ed7d08bdabbf4493aa2a864676ef4a8646043a 100644 (file)
@@ -68,9 +68,9 @@ static enum act_return tcp_action_req_set_src(struct act_rule *rule, struct prox
 
        case ACT_F_TCP_REQ_CNT:
        case ACT_F_HTTP_REQ:
-               if (!si_get_src(&s->si[0]))
+               if (!si_get_src(cs_si(s->csf)))
                        goto end;
-               src = s->si[0].src;
+               src = cs_si(s->csf)->src;
                break;
 
        default:
@@ -124,9 +124,9 @@ static enum act_return tcp_action_req_set_dst(struct act_rule *rule, struct prox
 
        case ACT_F_TCP_REQ_CNT:
        case ACT_F_HTTP_REQ:
-               if (!si_get_dst(&s->si[0]))
+               if (!si_get_dst(cs_si(s->csf)))
                        goto end;
-               dst = s->si[0].dst;
+               dst = cs_si(s->csf)->dst;
                break;
 
        default:
@@ -181,9 +181,9 @@ static enum act_return tcp_action_req_set_src_port(struct act_rule *rule, struct
 
        case ACT_F_TCP_REQ_CNT:
        case ACT_F_HTTP_REQ:
-               if (!si_get_src(&s->si[0]))
+               if (!si_get_src(cs_si(s->csf)))
                        goto end;
-               src = s->si[0].src;
+               src = cs_si(s->csf)->src;
                break;
 
        default:
@@ -236,9 +236,9 @@ static enum act_return tcp_action_req_set_dst_port(struct act_rule *rule, struct
 
        case ACT_F_TCP_REQ_CNT:
        case ACT_F_HTTP_REQ:
-               if (!si_get_dst(&s->si[0]))
+               if (!si_get_dst(cs_si(s->csf)))
                        goto end;
-               dst = s->si[0].dst;
+               dst = cs_si(s->csf)->dst;
                break;
 
        default: