}
p = q;
key = strtoul(p, &q, 10);
- if (key > KEY_SLOTS) {
+ if (key >= KEY_SLOTS) {
fr_strerror_printf("Key %lu outside of redis slot range", key);
return FR_REDIS_CLUSTER_RCODE_BAD_INPUT;
}
goto error;
}
- if (map->element[0]->integer > KEY_SLOTS) {
- fr_strerror_printf("Cluster map %zu key slot start is too high, expected <= "
+ if (map->element[0]->integer >= KEY_SLOTS) {
+ fr_strerror_printf("Cluster map %zu key slot start is too high, expected < "
STRINGIFY(KEY_SLOTS) " got %lli", i, map->element[0]->integer);
goto error;
}
goto error;
}
- if (map->element[1]->integer > KEY_SLOTS) {
- fr_strerror_printf("Cluster map %zu key slot end is too high, expected <= "
+ if (map->element[1]->integer >= KEY_SLOTS) {
+ fr_strerror_printf("Cluster map %zu key slot end is too high, expected < "
STRINGIFY(KEY_SLOTS) " got %lli", i, map->element[1]->integer);
goto error;
}