MINOR: config: improve error checking on TCP stick-table tracking
Commit 5d5b5d added support for multiple types to track-sc* but forgot to check that the types are compatible with the stick-tables.
This commit is contained in:
parent
d486ef5045
commit
5f53de79e4
@ -6263,6 +6263,12 @@ int check_config_validity()
|
||||
curproxy->id, trule->act_prm.trk_ctr.table.n ? trule->act_prm.trk_ctr.table.n : curproxy->id);
|
||||
cfgerr++;
|
||||
}
|
||||
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",
|
||||
curproxy->id, trule->act_prm.trk_ctr.table.n ? trule->act_prm.trk_ctr.table.n : curproxy->id,
|
||||
trule->action == TCP_ACT_TRK_SC1 ? 1 : 2);
|
||||
cfgerr++;
|
||||
}
|
||||
else {
|
||||
free(trule->act_prm.trk_ctr.table.n);
|
||||
trule->act_prm.trk_ctr.table.t = &target->table;
|
||||
@ -6296,6 +6302,12 @@ int check_config_validity()
|
||||
curproxy->id, trule->act_prm.trk_ctr.table.n ? trule->act_prm.trk_ctr.table.n : curproxy->id);
|
||||
cfgerr++;
|
||||
}
|
||||
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",
|
||||
curproxy->id, trule->act_prm.trk_ctr.table.n ? trule->act_prm.trk_ctr.table.n : curproxy->id,
|
||||
trule->action == TCP_ACT_TRK_SC1 ? 1 : 2);
|
||||
cfgerr++;
|
||||
}
|
||||
else {
|
||||
free(trule->act_prm.trk_ctr.table.n);
|
||||
trule->act_prm.trk_ctr.table.t = &target->table;
|
||||
|
Loading…
x
Reference in New Issue
Block a user