]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tcp-act: Add set-src/set-src-port for "tcp-request content" rules
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 23 Jun 2021 10:07:21 +0000 (12:07 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Oct 2021 09:35:59 +0000 (11:35 +0200)
commit1e83b70409cbdc0423afc46d7313d2ab4be90730
tree868b3b5ba31c23e5cfda11c6a070253d137ce0ee
parentd69377eb02a15e801eaa66f81f5ad3c563e2b3b8
MINOR: tcp-act: Add set-src/set-src-port for "tcp-request content" rules

This patch was reverted because it was inconsitent to change connection
addresses at stream level. Especially in HTTP because all requests was
affected by this change and not only the current one. In HTTP/2, it was
worse. Several streams was able to change the connection addresses at the
same time.

It is no longer an issue, thanks to recent changes. With multi-level client
source and destination addresses, it is possible to limit the change to the
current request. Thus this patch can be reintroduced.

If it possible to set source IP/Port from "tcp-request connection",
"tcp-request session" and "http-request" rules but not from "tcp-request
content" rules. There is no reason for this limitation and it may be a
problem for anyone wanting to call a lua fetch to dynamically set source
IP/Port from a TCP proxy. Indeed, to call a lua fetch, we must have a
stream. And there is no stream when "tcp-request connection/session" rules
are evaluated.

Thanks to this patch, "set-src" and "set-src-port" action are now supported
by "tcp_request content" rules.

This patch is related to the issue #1303.
doc/configuration.txt
src/tcp_act.c