]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Ignore FUZZY_STAT
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 12 May 2023 09:38:20 +0000 (10:38 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 12 May 2023 09:38:20 +0000 (10:38 +0100)
src/fuzzy_storage.c

index 8a5b4301730436b15842f0cc3c5264ddcd5680f3..347130c41a4adb528e887cc6c4f38622de9e8b2a 100644 (file)
@@ -874,16 +874,18 @@ rspamd_fuzzy_make_reply (struct rspamd_fuzzy_cmd *cmd,
                        session->reply.rep.v1.flag = 0;
                }
 
-               rspamd_fuzzy_update_stats (session->ctx,
-                       session->epoch,
-                       session->reply.rep.v1.prob > 0.5f,
-                       flags & RSPAMD_FUZZY_REPLY_SHINGLE,
-                       flags & RSPAMD_FUZZY_REPLY_DELAY,
-                       session->key,
-                       session->ip_stat,
-                       cmd->cmd,
-                       &session->reply.rep,
-                       session->timestamp);
+               if (cmd->cmd != FUZZY_STAT && cmd->cmd <= FUZZY_CLIENT_MAX) {
+                       rspamd_fuzzy_update_stats(session->ctx,
+                               session->epoch,
+                               session->reply.rep.v1.prob > 0.5f,
+                               flags & RSPAMD_FUZZY_REPLY_SHINGLE,
+                               flags & RSPAMD_FUZZY_REPLY_DELAY,
+                               session->key,
+                               session->ip_stat,
+                               cmd->cmd,
+                               &session->reply.rep,
+                               session->timestamp);
+               }
        }
 
        rspamd_fuzzy_write_reply (session);