]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tools: fix set_net_port() / set_host_port() on IPv4
authorWilly Tarreau <w@1wt.eu>
Thu, 20 Sep 2018 08:48:35 +0000 (10:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 Sep 2018 08:52:48 +0000 (10:52 +0200)
commit4c0fcc2314f746b05bd5a613f188784761dc9ac9
tree6202749a975ad7c91c844d683acf3f25497ef442
parent5cc8a0a7ac81ee6ab589825e14bae55373b0b76d
BUG/MINOR: tools: fix set_net_port() / set_host_port() on IPv4

These two functions were apparently written on the same model as their
parents when added by commit 11bcb6c4f ("[MEDIUM] IPv6 support for syslog")
except that they perform an assignment instead of a return, and as a
result fall through the next case where the assigned value may possibly
be partially overwritten. At least under Linux the port offset is the
same in both sockaddr_in and sockaddr_in6 so the value is written twice
without side effects.

This needs to be backported as far as 1.5.
include/common/standard.h