]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Explain unobvious code
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 21 Sep 2021 18:24:35 +0000 (19:24 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 21 Sep 2021 18:24:35 +0000 (19:24 +0100)
src/libserver/spf.c

index 9af1dd112d9446da084cffd6fc138a29a84118b2..7dd5ed31ca1e9347aba907d5e972ab5241ba7033 100644 (file)
@@ -570,8 +570,11 @@ rspamd_spf_record_postprocess (struct spf_resolved *rec, struct rspamd_task *tas
                if (cur_addr->flags & RSPAMD_SPF_FLAG_IPV6) {
                        guint64 t[3];
 
+                       /*
+                        * Fill hash entry for ipv6 addr with 2 int64 from ipv6 address,
+                        * the remaining int64 has mech + mask
+                        */
                        memcpy (t, cur_addr->addr6, sizeof (guint64) * 2);
-                       t[2] = 0;
                        t[2] = ((guint64) (cur_addr->mech)) << 48u;
                        t[2] |= cur_addr->m.dual.mask_v6;