From: Erwan Le Goas Date: Thu, 29 Sep 2022 08:27:33 +0000 (+0200) Subject: MINOR: cli: use hash_ipanon to anonymized address X-Git-Tag: v2.7-dev7~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ac3ccb03f9ec2ce160498a4cdc6ae6da55b5a84;p=thirdparty%2Fhaproxy.git MINOR: cli: use hash_ipanon to anonymized address Replace HA_ANON_CLI by hash_ipanon to anonynmized address like anonymizing address in the configuration file. No backport needed, except if anonymization mechanism is backported. --- diff --git a/src/proxy.c b/src/proxy.c index 7c50b4beb6..6d59c838d4 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -2790,7 +2790,8 @@ static int dump_servers_state(struct stconn *sc) "%s %s %d" "\n", px->uuid, HA_ANON_CLI(px->id), - srv->puid, HA_ANON_CLI(srv->id), HA_ANON_CLI(srv_addr), + srv->puid, HA_ANON_CLI(srv->id), + hash_ipanon(appctx->cli_anon_key, srv_addr, 0), srv->cur_state, srv->cur_admin, srv->uweight, srv->iweight, (long int)srv_time_since_last_change, srv->check.status, srv->check.result, srv->check.health, @@ -2805,7 +2806,7 @@ static int dump_servers_state(struct stconn *sc) chunk_printf(&trash, "%s/%s %d/%d %s %u - %u %u %u %u %u %u %d %u", HA_ANON_CLI(px->id), HA_ANON_CLI(srv->id), - px->uuid, srv->puid, HA_ANON_CLI(srv_addr), + px->uuid, srv->puid, hash_ipanon(appctx->cli_anon_key, srv_addr, 0), srv->svc_port, srv->pool_purge_delay, srv->curr_used_conns, srv->max_used_conns, srv->est_need_conns, srv->curr_idle_nb, srv->curr_safe_nb, (int)srv->max_idle_conns, srv->curr_idle_conns);