Skip to content

Commit

Permalink
fix: dont resolve to ipv6 addresses when its disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Green-Sky committed Jan 15, 2024
1 parent f81d8d5 commit 70db77f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5061f92a95ba45cfa49d78175fa8fb6e4d66a58d86634ea3fd3ae6d80cb0558a /usr/local/bin/tox-bootstrapd
ccaf7a29c16d97068952d872b8663e38cc3d958aff01baeafee04e0ac6f3ac98 /usr/local/bin/tox-bootstrapd
5 changes: 5 additions & 0 deletions toxcore/tox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 70db77f

Please sign in to comment.