commit 5091e29: [Minor] Obsolete old fuzzy epochs
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Mar 2 22:28:04 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-03-02 22:22:31 +0000
URL: https://github.com/rspamd/rspamd/commit/5091e292342eadcd7a5a62c924717a88b4baffe7 (HEAD -> master)
[Minor] Obsolete old fuzzy epochs
---
src/fuzzy_storage.c | 20 +++-----------------
src/libserver/fuzzy_wire.h | 3 ---
2 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 6eb79640e..b9397fc2e 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -1228,20 +1228,6 @@ rspamd_fuzzy_command_valid (struct rspamd_fuzzy_cmd *cmd, gint r)
}
}
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;
}
@@ -1890,7 +1876,7 @@ rspamd_fuzzy_stat_to_ucl (struct rspamd_fuzzy_storage_ctx *ctx, gboolean ip_stat
/* 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]));
}
@@ -1900,7 +1886,7 @@ rspamd_fuzzy_stat_to_ucl (struct rspamd_fuzzy_storage_ctx *ctx, gboolean ip_stat
/* 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]));
}
@@ -1910,7 +1896,7 @@ rspamd_fuzzy_stat_to_ucl (struct rspamd_fuzzy_storage_ctx *ctx, gboolean ip_stat
/* 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]));
}
diff --git a/src/libserver/fuzzy_wire.h b/src/libserver/fuzzy_wire.h
index 82e386657..8680e16fb 100644
--- a/src/libserver/fuzzy_wire.h
+++ b/src/libserver/fuzzy_wire.h
@@ -27,9 +27,6 @@ extern "C" {
* 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
More information about the Commits
mailing list