]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: peers: stop relying on srv->addr to find peer port
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 18 Apr 2024 09:03:45 +0000 (11:03 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 18 Apr 2024 09:18:26 +0000 (11:18 +0200)
Now that peers entirely rely on peer->srv for connection settings, and
that it was confirmed that it works properly thanks to previous commit,
let's finish what we started in f6ae258 ("MINOR: peers: rely on srv->addr
and remove peer->addr") and stop using srv->addr to find out peers port
and instead rely on srv->svc_port as it's already done for other proxy
types.

src/peers.c

index 904eb446a972845ea077c3c5b1b3491be5a14726..c53dfc175a8228f053dd1a65d58be64bf88dd272 100644 (file)
@@ -4040,7 +4040,7 @@ static int peers_dump_peer(struct buffer *msg, struct appctx *appctx, struct pee
                      peer, peer->id,
                      peer->local ? "local" : "remote",
                      peer->appctx ? "active" : "inactive",
-                     pn, get_host_port(&peer->srv->addr),
+                     pn, peer->srv->svc_port,
                      statuscode_str(peer->statuscode));
 
        chunk_appendf(msg, " last_hdshk=%s\n",