From: Vsevolod Stakhov Date: Tue, 21 Sep 2021 18:24:35 +0000 (+0100) Subject: [Minor] Explain unobvious code X-Git-Tag: 3.1~128 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42bdabaf651ec3a809c6e8cc88f8f1a21f8661c6;p=thirdparty%2Frspamd.git [Minor] Explain unobvious code --- diff --git a/src/libserver/spf.c b/src/libserver/spf.c index 9af1dd112d..7dd5ed31ca 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;