From 2a58f4140706f8b3c53c79bfb5a64b019f692b80 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Mon, 9 Jun 2025 12:49:36 +0900 Subject: [PATCH] Fix heartbeat_device treatment. While processing pgpool.conf, heartbeat_device was mistakenly treated and the first device was ignored. For example: heartbeat_device0 = 'eth0' the configuration process disregarded 'eth0' and acted as if no device was set. Another example: heartbeat_device0 = 'eth0;eth1' "eth0" was simply ignored. Reviewed-by: Bo Peng Backpatch-through: v4.2 --- src/config/pool_config_variables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/pool_config_variables.c b/src/config/pool_config_variables.c index 23397a0f5..6fc3a773d 100644 --- a/src/config/pool_config_variables.c +++ b/src/config/pool_config_variables.c @@ -5273,7 +5273,7 @@ SetHBDestIfFunc(int elevel) { strlcpy(g_pool_config.hb_dest_if[idx].addr, addrs[j], WD_MAX_HOST_NAMELEN - 1); g_pool_config.hb_dest_if[idx].dest_port = hbNodeInfo->dest_port; - if (n_if_name > j + 1) + if (n_if_name > j ) { strlcpy(g_pool_config.hb_dest_if[idx].if_name, if_names[j], WD_MAX_IF_NAME_LEN - 1); pfree(if_names[j]); -- 2.39.5