diff --git a/src/stick_table.c b/src/stick_table.c index a1900f66f..cac2de202 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -3157,9 +3157,9 @@ static enum act_parse_ret parse_add_gpc(const char **args, int *arg, struct prox return ACT_RET_PRS_ERR; } - if (rule->arg.gpc.sc >= MAX_SESS_STKCTR) { - memprintf(err, "invalid stick table track ID '%s' for '%s'. The max allowed ID is %d", - cmd_name, args[*arg-1], MAX_SESS_STKCTR-1); + if (rule->arg.gpc.sc >= global.tune.nb_stk_ctr) { + memprintf(err, "invalid stick table track ID '%s'. The max allowed ID is %d (tune.stick-counters)", + args[*arg-1], global.tune.nb_stk_ctr - 1); return ACT_RET_PRS_ERR; } }