mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
fix: dont resolve to ipv6 addresses when its disabled
This commit is contained in:
parent
d3b935f63f
commit
001d00ab30
|
@ -1 +1 @@
|
|||
5061f92a95ba45cfa49d78175fa8fb6e4d66a58d86634ea3fd3ae6d80cb0558a /usr/local/bin/tox-bootstrapd
|
||||
ccaf7a29c16d97068952d872b8663e38cc3d958aff01baeafee04e0ac6f3ac98 /usr/local/bin/tox-bootstrapd
|
||||
|
|
|
@ -1058,6 +1058,11 @@ bool tox_bootstrap(Tox *tox, const char *host, uint16_t port, const uint8_t publ
|
|||
bool udp_success = tox->m->options.udp_disabled;
|
||||
|
||||
for (int32_t i = 0; i < count; ++i) {
|
||||
if (!tox->m->options.ipv6enabled && net_family_is_ipv6(root[i].ip.family)) {
|
||||
// We can't use ipv6 when it's disabled.
|
||||
continue;
|
||||
}
|
||||
|
||||
root[i].port = net_htons(port);
|
||||
|
||||
if (onion_add_bs_path_node(tox->m->onion_c, &root[i], public_key)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user