commit 0564481: [Minor] More masks changes
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Jan 24 18:28:06 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-01-24 18:22:48 +0000
URL: https://github.com/rspamd/rspamd/commit/05644814583e45c0decf281f5450ef46bc6cd4d7
[Minor] More masks changes
---
src/libutil/radix.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/libutil/radix.c b/src/libutil/radix.c
index 81f929731..8619d3118 100644
--- a/src/libutil/radix.c
+++ b/src/libutil/radix.c
@@ -299,10 +299,12 @@ rspamd_radix_add_iplist (const gchar *list, const gchar *separators,
memcpy (addr_buf.buf + 12,
&sin->sin_addr, 4);
+ k += 96;
+
radix_insert_compressed (tree,
addr_buf.buf,
sizeof (addr_buf.buf),
- 32 - k, (uintptr_t)value);
+ 128 - k, (uintptr_t)value);
res ++;
}
else if (cur_ai->ai_family == AF_INET6) {
@@ -352,8 +354,9 @@ rspamd_radix_add_iplist (const gchar *list, const gchar *separators,
memset (addr_buf.buf, 0, 10);
addr_buf.buf[10] = 0xffu;
addr_buf.buf[11] = 0xffu;
+ k += 96;
radix_insert_compressed (tree, addr_buf.buf, sizeof (addr_buf.buf),
- 32 - k, (uintptr_t)value);
+ 128 - k, (uintptr_t)value);
res ++;
}
else if (af == AF_INET6){
More information about the Commits
mailing list