]> source.dussan.org Git - rspamd.git/commitdiff
Set the correct epoch for encrypted requests.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 30 Sep 2015 17:39:48 +0000 (18:39 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 30 Sep 2015 17:39:48 +0000 (18:39 +0100)
src/fuzzy_storage.c

index 82af1c28234f17db5c5cfb1cd826f0857135d978..c60046a5b23b6046f3cc6e60d1421e47d9c480d2 100644 (file)
@@ -336,7 +336,8 @@ rspamd_fuzzy_cmd_from_wire (guchar *buf, guint buflen, struct fuzzy_session *s)
                        msg_debug ("invalid fuzzy command of size %d received", buflen);
                        return FALSE;
                }
-               s->epoch = epoch;
+               /* Encrypted is epoch 10 at least */
+               s->epoch = RSPAMD_FUZZY_EPOCH10;
                break;
        case sizeof (struct rspamd_fuzzy_encrypted_shingle_cmd):
                s->cmd_type = CMD_ENCRYPTED_SHINGLE;
@@ -352,7 +353,8 @@ rspamd_fuzzy_cmd_from_wire (guchar *buf, guint buflen, struct fuzzy_session *s)
                        msg_debug ("invalid fuzzy command of size %d received", buflen);
                        return FALSE;
                }
-               s->epoch = epoch;
+
+               s->epoch = RSPAMD_FUZZY_EPOCH10;
                break;
        default:
                msg_debug ("invalid fuzzy command of size %d received", buflen);