diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-01-15 00:48:35 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-01-16 14:17:05 +0000 |
commit | 0b13936ce8498735e245531c222c035f41fd5e0f (patch) | |
tree | bafaef43863e822bbcb0c05192da0a973b3381a1 /toxcore/net_crypto.c | |
parent | b3ec05543acdc0019b545de170720dc32d8f28d3 (diff) |
Use apidsl to generate LAN_discovery.h.
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index b3cf2cbf..3150392e 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -432,7 +432,7 @@ static int add_ip_port_connection(Net_Crypto *c, int crypt_connection_id, IP_Por | |||
432 | } | 432 | } |
433 | 433 | ||
434 | if (ip_port.ip.family == TOX_AF_INET) { | 434 | if (ip_port.ip.family == TOX_AF_INET) { |
435 | if (!ipport_equal(&ip_port, &conn->ip_portv4) && LAN_ip(conn->ip_portv4.ip) != 0) { | 435 | if (!ipport_equal(&ip_port, &conn->ip_portv4) && ip_is_lan(conn->ip_portv4.ip) != 0) { |
436 | if (!bs_list_add(&c->ip_port_list, (uint8_t *)&ip_port, crypt_connection_id)) { | 436 | if (!bs_list_add(&c->ip_port_list, (uint8_t *)&ip_port, crypt_connection_id)) { |
437 | return -1; | 437 | return -1; |
438 | } | 438 | } |
@@ -482,7 +482,7 @@ static IP_Port return_ip_port_connection(Net_Crypto *c, int crypt_connection_id) | |||
482 | v6 = 1; | 482 | v6 = 1; |
483 | } | 483 | } |
484 | 484 | ||
485 | if (v4 && LAN_ip(conn->ip_portv4.ip) == 0) { | 485 | if (v4 && ip_is_lan(conn->ip_portv4.ip) == 0) { |
486 | return conn->ip_portv4; | 486 | return conn->ip_portv4; |
487 | } | 487 | } |
488 | 488 | ||