]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: backend: fix reuse with set-dst/set-dst-port
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 31 Mar 2025 15:57:56 +0000 (17:57 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 2 Apr 2025 12:57:40 +0000 (14:57 +0200)
commit5fda64e87e7963fa65812e0583338191e4cc7c8b
treecd693ed010cf2443744fc32d947cdaf9d08057f9
parentd7fa8e88c4cda6d115b05c65cded5acb4069ee97
BUG/MEDIUM: backend: fix reuse with set-dst/set-dst-port

On backend connection reuse, a hash is calculated from various
parameters, to ensure the selected connection match the requested
parameters. Notably, destination address is one of these parameters.
However, it is only taken into account if using a transparent server
(server address 0.0.0.0).

This may cause issue where an incorrect connection is reused, which is
not targetted to the correct destination address. This may be the case
if a set-dst/set-dst-port is used with a transparent proxy (proxy option
transparent).

The fix is simple enough. Destination address is now always used as
input to the connection reuse hash.

This must be backported up to 2.6. Note that for reverse HTTP to work,
it relies on the following patch, which ensures destination address
remains NULL in this case.

  commit e94baf6ca71cb2319610baa74dbf17b9bc602b18
  BUG/MINOR: rhttp: fix incorrect dst/dst_port values
src/backend.c