The index of the failing rule is reported in the health-check log message. The
rules index is also used in the check traces. But for implicit HTTP send/expect
rules, the index is wrong. It must be incremented by one compared to the
preceding rule.
This patch may be backported as far as 2.2.
if (next && next->action == TCPCHK_ACT_CONNECT) {
LIST_DELETE(&chk->list);
LIST_INSERT(&next->list, &chk->list);
- chk->index = next->index;
+ chk->index = next->index + 1;
}
}
goto out;
}
LIST_APPEND(px->tcpcheck_rules.list, &next->list);
- next->index = chk->index;
+ next->index = chk->index + 1;
}
}