]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Replace in6_addr_t with struct in6_addr as defined by POSIX
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Jun 2020 10:25:46 +0000 (11:25 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Jun 2020 10:25:46 +0000 (11:25 +0100)
src/fuzzy_storage.c
src/libutil/addr.h

index 53e9f1efab412c2ec899f28abc02d15801da7222..6242e47c77f2520c45c7e229898b85ec205740d8 100644 (file)
@@ -1256,17 +1256,17 @@ rspamd_fuzzy_extensions_from_wire (struct fuzzy_session *s, guchar *buf, gsize b
                                p += sizeof (in_addr_t);
                        }
                        else if (cmd == RSPAMD_FUZZY_EXT_SOURCE_IP6) {
-                               if (end - p >= sizeof (in6_addr_t)) {
-                                       p += sizeof (in6_addr_t);
+                               if (end - p >= sizeof (struct in6_addr)) {
+                                       p += sizeof (struct in6_addr);
                                        n_ext ++;
-                                       st_len += sizeof (in6_addr_t);
+                                       st_len += sizeof (struct in6_addr);
                                }
                                else {
                                        /* Truncation */
                                        return FALSE;
                                }
 
-                               p += sizeof (in6_addr_t);
+                               p += sizeof (struct in6_addr);
                        }
                }
                else {
@@ -1323,11 +1323,11 @@ rspamd_fuzzy_extensions_from_wire (struct fuzzy_session *s, guchar *buf, gsize b
 
                                ext->ext = RSPAMD_FUZZY_EXT_SOURCE_IP6;
                                ext->next = ext + 1;
-                               ext->length = sizeof (in6_addr_t);
+                               ext->length = sizeof (struct in6_addr);
                                ext->payload = dest;
-                               memcpy (dest, p, sizeof (in6_addr_t));
+                               memcpy (dest, p, sizeof (struct in6_addr));
                                p += sizeof (in_addr_t);
-                               data_buf += sizeof (in6_addr_t);
+                               data_buf += sizeof (struct in6_addr);
                                ext = ext->next;
                        }
                }
index 483ad9434990dd07e535a5b6f34442e2ed41d698..0102910082c4221d6bbb5601d9fe30c3f7c6c4fc 100644 (file)
@@ -86,7 +86,7 @@ rspamd_inet_addr_t *rspamd_inet_address_from_rnds (
 
 /**
  * Parse string with ipv6 address of length `len` to `target` which should be
- * at least sizeof (in6_addr_t)
+ * at least sizeof (struct in6_addr)
  * @param text input string
  * @param len length of `text` (if 0, then `text` must be zero terminated)
  * @param target target structure