diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-03 13:02:35 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-03 13:02:35 +0100 |
commit | cb9a80f16557f45514e1a3641ad26f3b168637fa (patch) | |
tree | e9339d27a232d306a038e6eeeaeb7168492a3a12 | |
parent | a0c16f60f79532b6b307a02654b0e51f6e500315 (diff) | |
download | rspamd-cb9a80f16557f45514e1a3641ad26f3b168637fa.tar.gz rspamd-cb9a80f16557f45514e1a3641ad26f3b168637fa.zip |
[Fix] Fix ipv6 mask application
-rw-r--r-- | src/libutil/addr.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |