]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: peers: rely on srv->addr and remove peer->addr
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 30 Nov 2023 16:41:58 +0000 (17:41 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 21 Dec 2023 13:22:27 +0000 (14:22 +0100)
commitf6ae25858d76a979c90db4ae44a4df4982d97e78
tree398b4ba725cbd15d526de38aafb70dd7e9788977
parent372d3e29347cb072197200d4a5b7ea3dbad71421
MINOR: peers: rely on srv->addr and remove peer->addr

Similarly to the previous commit, we get rid of unused peer member.

peer->addr was only used to save a copy of the sever's addr at parsing
time. But instead of relying on an intermediate variable, we can actually
use server's address directly when initiating the peer session.

As with other streams created from server's settings (tcp/http, log, ring),
we should rely on srv->svc_port for the port part of the address. This
shouldn't change anything for peers since the address is fully resolved
at parsing time and runtime changes are not supported, but this should
help to make the code future-proof.
include/haproxy/peers-t.h
src/cfgparse.c
src/peers.c