BUG/MINOR: tcp-act: Don't forget to set the original port for IPv4 set-dst rule
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Mar 2021 10:21:14 +0000 (11:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Mar 2021 16:59:35 +0000 (17:59 +0100)
commit3a6133a3b7eff777f0c7bee0f000a763cf2ec971
tree8bf25db5119297b25116840eb87ad3a44b87c8cf
parentdf82f0b02a556f15cb4550851699828f5b11a6bf
BUG/MINOR: tcp-act: Don't forget to set the original port for IPv4 set-dst rule

If an IPv4 is set via a TCP/HTTP set-dst rule, the original port must be
preserved or set to 0 if the previous family was neither AF_INET nor
AF_INET6. The first case is not an issue because the port remains the
same. But if the previous family was, for instance, AF_UNIX, the port is not
set to 0 and have an undefined value.

This patch must be backported as far as 1.7.

(cherry picked from commit e01ca0fbc9c72de95514816e016a58c5a28ab2a8)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/tcp_act.c