summaryrefslogtreecommitdiff
path: root/toxcore/onion.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/onion.c')
-rw-r--r--toxcore/onion.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/onion.c b/toxcore/onion.c
index ffe99c2d..48cc4d76 100644
--- a/toxcore/onion.c
+++ b/toxcore/onion.c
@@ -55,9 +55,9 @@ static void ip_pack(uint8_t *data, IP source)
55 55
56 if (source.family == TOX_AF_INET || source.family == TOX_TCP_INET) { 56 if (source.family == TOX_AF_INET || source.family == TOX_TCP_INET) {
57 memset(data + 1, 0, SIZE_IP6); 57 memset(data + 1, 0, SIZE_IP6);
58 memcpy(data + 1, source.ip4.uint8, SIZE_IP4); 58 memcpy(data + 1, source.ip.v4.uint8, SIZE_IP4);
59 } else { 59 } else {
60 memcpy(data + 1, source.ip6.uint8, SIZE_IP6); 60 memcpy(data + 1, source.ip.v6.uint8, SIZE_IP6);
61 } 61 }
62} 62}
63 63
@@ -71,9 +71,9 @@ static int ip_unpack(IP *target, const uint8_t *data, unsigned int data_size, bo
71 target->family = data[0]; 71 target->family = data[0];
72 72
73 if (target->family == TOX_AF_INET || target->family == TOX_TCP_INET) { 73 if (target->family == TOX_AF_INET || target->family == TOX_TCP_INET) {
74 memcpy(target->ip4.uint8, data + 1, SIZE_IP4); 74 memcpy(target->ip.v4.uint8, data + 1, SIZE_IP4);
75 } else { 75 } else {
76 memcpy(target->ip6.uint8, data + 1, SIZE_IP6); 76 memcpy(target->ip.v6.uint8, data + 1, SIZE_IP6);
77 } 77 }
78 78
79 bool valid = disable_family_check || 79 bool valid = disable_family_check ||