Skip to content

Commit 001d00a

Browse files
committed
fix: dont resolve to ipv6 addresses when its disabled
1 parent d3b935f commit 001d00a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5061f92a95ba45cfa49d78175fa8fb6e4d66a58d86634ea3fd3ae6d80cb0558a /usr/local/bin/tox-bootstrapd
1+
ccaf7a29c16d97068952d872b8663e38cc3d958aff01baeafee04e0ac6f3ac98 /usr/local/bin/tox-bootstrapd

toxcore/tox.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,11 @@ bool tox_bootstrap(Tox *tox, const char *host, uint16_t port, const uint8_t publ
10581058
bool udp_success = tox->m->options.udp_disabled;
10591059

10601060
for (int32_t i = 0; i < count; ++i) {
1061+
if (!tox->m->options.ipv6enabled && net_family_is_ipv6(root[i].ip.family)) {
1062+
// We can't use ipv6 when it's disabled.
1063+
continue;
1064+
}
1065+
10611066
root[i].port = net_htons(port);
10621067

10631068
if (onion_add_bs_path_node(tox->m->onion_c, &root[i], public_key)) {

0 commit comments

Comments
 (0)