aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/radix.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-01-24 18:22:48 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-01-24 18:22:48 +0000
commit05644814583e45c0decf281f5450ef46bc6cd4d7 (patch)
tree051fd9f06ecd3238cf45b03d221c84922bc73d04 /src/libutil/radix.c
parente369efa91be624f2c5134f89744aa7ca7ea3fee7 (diff)
downloadrspamd-05644814583e45c0decf281f5450ef46bc6cd4d7.tar.gz
rspamd-05644814583e45c0decf281f5450ef46bc6cd4d7.zip
[Minor] More masks changes
Diffstat (limited to 'src/libutil/radix.c')
-rw-r--r--src/libutil/radix.c7
1 files 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){