]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: server: make "agent-addr" work on default-server line
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2019 14:43:45 +0000 (15:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2019 14:43:45 +0000 (15:43 +0100)
commit2444108f16868ccde928d97ffa3db847ddad89fb
tree068513aef6ecaab9de9f388d08d5ec646f05a0ab
parentcdcba115b8a6d3773d5bd3c0fe6f8c239d356eab
BUG/MINOR: server: make "agent-addr" work on default-server line

As reported in issue #408, "agent-addr" doesn't work on default-server
lines. This is due to the transcription of the old "addr" option in commit
6e5e0d8f9e ("MINOR: server: Make 'default-server' support 'addr' keyword.")
which correctly assigns it to the check.addr and agent.addr fields, but
which also copies the default check.addr into both the check's and the
agent's addr fields. Thus the default agent's address is never used.

This fix makes sure to copy the check from the check and the agent from
the agent. However it's worth noting that if "addr" is specified on the
server line, it will still overwrite both the check and the agent's
addresses.

This must be backported as far as 1.8.
src/server.c