diff options
Diffstat (limited to 'toxcore/onion_client.c')
-rw-r--r-- | toxcore/onion_client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 424711d5..24f41e6f 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -40,6 +40,9 @@ | |||
40 | */ | 40 | */ |
41 | int onion_add_path_node(Onion_Client *onion_c, IP_Port ip_port, const uint8_t *client_id) | 41 | int onion_add_path_node(Onion_Client *onion_c, IP_Port ip_port, const uint8_t *client_id) |
42 | { | 42 | { |
43 | if (ip_port.ip.family != AF_INET && ip_port.ip.family != AF_INET6) | ||
44 | return -1; | ||
45 | |||
43 | unsigned int i; | 46 | unsigned int i; |
44 | 47 | ||
45 | for (i = 0; i < MAX_PATH_NODES; ++i) { | 48 | for (i = 0; i < MAX_PATH_NODES; ++i) { |