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 <pengbo@sraoss.co.jp>
Backpatch-through: v4.2
{
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]);