Skip to content

Commit 001aa63

Browse files
committed
fix: Allow port range in DHT_bootstrap.c.
1 parent d15d9fa commit 001aa63

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

other/DHT_bootstrap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ int main(int argc, char *argv[])
143143
}
144144

145145
Mono_Time *mono_time = mono_time_new();
146-
DHT *dht = new_dht(logger, mono_time, new_networking_ex(logger, &ip, PORT, PORT, nullptr), true, true);
146+
const uint16_t start_port = PORT;
147+
const uint16_t end_port = start_port + (TOX_PORTRANGE_TO - TOX_PORTRANGE_FROM);
148+
DHT *dht = new_dht(logger, mono_time, new_networking_ex(logger, &ip, start_port, end_port, nullptr), true, true);
147149
Onion *onion = new_onion(logger, mono_time, dht);
148150
const Onion_Announce *onion_a = new_onion_announce(logger, mono_time, dht);
149151

0 commit comments

Comments
 (0)