BUG/MINOR: config: report the correct track-sc number in tcp-rules
When parsing track-sc* actions in tcp-request rules, we now automatically compute the track-sc identifier number using %d when displaying an error message. But the ID has become wrong since we introduced sc0, we continue to report id+1 in error messages causing some confusion. No backport is needed.
This commit is contained in:
parent
1903acdf3a
commit
34c2fb6f89
|
@ -60,7 +60,7 @@ static inline struct stktable_key *addr_to_stktable_key(struct sockaddr_storage
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for a tcp-request action TCP_ACT_TRK_*, return a tracking index starting at
|
/* for a tcp-request action TCP_ACT_TRK_*, return a tracking index starting at
|
||||||
* zero for SC1. Unknown actions also return zero.
|
* zero for SC0. Unknown actions also return zero.
|
||||||
*/
|
*/
|
||||||
static inline int tcp_trk_idx(int trk_action)
|
static inline int tcp_trk_idx(int trk_action)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6498,7 +6498,7 @@ int check_config_validity()
|
||||||
if (!target) {
|
if (!target) {
|
||||||
Alert("Proxy '%s': unable to find table '%s' referenced by track-sc%d.\n",
|
Alert("Proxy '%s': unable to find table '%s' referenced by track-sc%d.\n",
|
||||||
curproxy->id, trule->act_prm.trk_ctr.table.n,
|
curproxy->id, trule->act_prm.trk_ctr.table.n,
|
||||||
1 + tcp_trk_idx(trule->action));
|
tcp_trk_idx(trule->action));
|
||||||
cfgerr++;
|
cfgerr++;
|
||||||
}
|
}
|
||||||
else if (target->table.size == 0) {
|
else if (target->table.size == 0) {
|
||||||
|
@ -6509,7 +6509,7 @@ int check_config_validity()
|
||||||
else if (!stktable_compatible_sample(trule->act_prm.trk_ctr.expr, target->table.type)) {
|
else if (!stktable_compatible_sample(trule->act_prm.trk_ctr.expr, target->table.type)) {
|
||||||
Alert("Proxy '%s': stick-table '%s' uses a type incompatible with the 'track-sc%d' rule.\n",
|
Alert("Proxy '%s': stick-table '%s' uses a type incompatible with the 'track-sc%d' rule.\n",
|
||||||
curproxy->id, trule->act_prm.trk_ctr.table.n ? trule->act_prm.trk_ctr.table.n : curproxy->id,
|
curproxy->id, trule->act_prm.trk_ctr.table.n ? trule->act_prm.trk_ctr.table.n : curproxy->id,
|
||||||
1 + tcp_trk_idx(trule->action));
|
tcp_trk_idx(trule->action));
|
||||||
cfgerr++;
|
cfgerr++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -6537,7 +6537,7 @@ int check_config_validity()
|
||||||
if (!target) {
|
if (!target) {
|
||||||
Alert("Proxy '%s': unable to find table '%s' referenced by track-sc%d.\n",
|
Alert("Proxy '%s': unable to find table '%s' referenced by track-sc%d.\n",
|
||||||
curproxy->id, trule->act_prm.trk_ctr.table.n,
|
curproxy->id, trule->act_prm.trk_ctr.table.n,
|
||||||
1 + tcp_trk_idx(trule->action));
|
tcp_trk_idx(trule->action));
|
||||||
cfgerr++;
|
cfgerr++;
|
||||||
}
|
}
|
||||||
else if (target->table.size == 0) {
|
else if (target->table.size == 0) {
|
||||||
|
@ -6548,7 +6548,7 @@ int check_config_validity()
|
||||||
else if (!stktable_compatible_sample(trule->act_prm.trk_ctr.expr, target->table.type)) {
|
else if (!stktable_compatible_sample(trule->act_prm.trk_ctr.expr, target->table.type)) {
|
||||||
Alert("Proxy '%s': stick-table '%s' uses a type incompatible with the 'track-sc%d' rule.\n",
|
Alert("Proxy '%s': stick-table '%s' uses a type incompatible with the 'track-sc%d' rule.\n",
|
||||||
curproxy->id, trule->act_prm.trk_ctr.table.n ? trule->act_prm.trk_ctr.table.n : curproxy->id,
|
curproxy->id, trule->act_prm.trk_ctr.table.n ? trule->act_prm.trk_ctr.table.n : curproxy->id,
|
||||||
1 + tcp_trk_idx(trule->action));
|
tcp_trk_idx(trule->action));
|
||||||
cfgerr++;
|
cfgerr++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue