}
}
break;
- case 2:
- /*
- * rspamd 0.8 has slightly different tokenizer then it might be not
- * 100% compatible
- */
- if (cmd->shingles_count > 0) {
- if (r == sizeof (struct rspamd_fuzzy_shingle_cmd)) {
- ret = RSPAMD_FUZZY_EPOCH8;
- }
- }
- else {
- ret = RSPAMD_FUZZY_EPOCH8;
- }
- break;
default:
break;
}
/* Checked by epoch */
elt = ucl_object_typed_new (UCL_ARRAY);
- for (i = RSPAMD_FUZZY_EPOCH6; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
+ for (i = RSPAMD_FUZZY_EPOCH10; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
ucl_array_append (elt,
ucl_object_fromint (ctx->stat.fuzzy_hashes_checked[i]));
}
/* Shingles by epoch */
elt = ucl_object_typed_new (UCL_ARRAY);
- for (i = RSPAMD_FUZZY_EPOCH6; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
+ for (i = RSPAMD_FUZZY_EPOCH10; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
ucl_array_append (elt,
ucl_object_fromint (ctx->stat.fuzzy_shingles_checked[i]));
}
/* Matched by epoch */
elt = ucl_object_typed_new (UCL_ARRAY);
- for (i = RSPAMD_FUZZY_EPOCH6; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
+ for (i = RSPAMD_FUZZY_EPOCH10; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
ucl_array_append (elt,
ucl_object_fromint (ctx->stat.fuzzy_hashes_found[i]));
}
* The epoch of the fuzzy client
*/
enum rspamd_fuzzy_epoch {
- RSPAMD_FUZZY_EPOCH6 = 0, /**< pre 0.6.x */
- RSPAMD_FUZZY_EPOCH8, /**< 0.8 till 0.9 */
- RSPAMD_FUZZY_EPOCH9, /**< 0.9 + */
RSPAMD_FUZZY_EPOCH10, /**< 1.0+ encryption */
RSPAMD_FUZZY_EPOCH11, /**< 1.7+ extended reply */
RSPAMD_FUZZY_EPOCH_MAX