diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-21 19:24:35 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-21 19:24:35 +0100 |
commit | 42bdabaf651ec3a809c6e8cc88f8f1a21f8661c6 (patch) | |
tree | 34cb6873803a986a48afb89f6b9539070c4d8583 /src/libserver/spf.c | |
parent | 86e6cb7edb28d01dd888db9d38ef7c14978d56d3 (diff) | |
download | rspamd-42bdabaf651ec3a809c6e8cc88f8f1a21f8661c6.tar.gz rspamd-42bdabaf651ec3a809c6e8cc88f8f1a21f8661c6.zip |
[Minor] Explain unobvious code
Diffstat (limited to 'src/libserver/spf.c')
-rw-r--r-- | src/libserver/spf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libserver/spf.c b/src/libserver/spf.c index 9af1dd112..7dd5ed31c 100644 --- a/src/libserver/spf.c +++ b/src/libserver/spf.c @@ -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; |