From cb9a80f16557f45514e1a3641ad26f3b168637fa Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 3 May 2016 13:02:35 +0100 Subject: [Fix] Fix ipv6 mask application --- src/libutil/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libutil/addr.c') diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 255c28de4..8fc85e6c7 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -1245,7 +1245,7 @@ rspamd_inet_address_apply_mask (rspamd_inet_addr_t *addr, guint mask) umsk = htonl (G_MAXUINT32 << (32 - mask)); addr->u.in.addr.s4.sin_addr.s_addr &= umsk; } - else if (addr->af == AF_INET && mask <= 128) { + else if (addr->af == AF_INET6 && mask <= 128) { p = (uint32_t *)&addr->u.in.addr.s6.sin6_addr; p += 3; while (mask > 0) { -- cgit v1.2.3