You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ((*tcp_relay_ports)[*tcp_relay_port_count] <MIN_ALLOWED_PORT|| (*tcp_relay_ports)[*tcp_relay_port_count] >MAX_ALLOWED_PORT) {
151
-
syslog(LOG_WARNING, "Port #%d: Invalid port: %u, should be in [%d, %d]. Skipping.\n", i, (*tcp_relay_ports)[*tcp_relay_port_count], MIN_ALLOWED_PORT, MAX_ALLOWED_PORT);
152
+
153
+
if ((*tcp_relay_ports)[*tcp_relay_port_count] <MIN_ALLOWED_PORT
if ((*tcp_relay_ports)[*tcp_relay_port_count] <MIN_ALLOWED_PORT|| (*tcp_relay_ports)[*tcp_relay_port_count] >MAX_ALLOWED_PORT) {
197
-
syslog(LOG_WARNING, "Port #%d: Invalid port: %u, should be in [%d, %d]. Skipping.\n", i, (*tcp_relay_ports)[*tcp_relay_port_count], MIN_ALLOWED_PORT, MAX_ALLOWED_PORT);
201
+
202
+
if ((*tcp_relay_ports)[*tcp_relay_port_count] <MIN_ALLOWED_PORT
@@ -424,14 +436,15 @@ int bootstrap_from_config(char *cfg_file_path, DHT *dht, int enable_ipv6)
424
436
}
425
437
426
438
// Process settings
427
-
if (strlen(bs_public_key) !=crypto_box_PUBLICKEYBYTES*2) {
439
+
if (strlen(bs_public_key) !=crypto_box_PUBLICKEYBYTES*2) {
428
440
syslog(LOG_WARNING, "Bootstrap node #%d: Invalid '%s': %s. Skipping the node.\n", i, NAME_PUBLIC_KEY,
429
441
bs_public_key);
430
442
goto next;
431
443
}
432
444
433
445
if (bs_port<MIN_ALLOWED_PORT||bs_port>MAX_ALLOWED_PORT) {
434
-
syslog(LOG_WARNING, "Bootstrap node #%d: Invalid '%s': %d, should be in [%d, %d]. Skipping the node.\n", i, NAME_PORT, bs_port, MIN_ALLOWED_PORT, MAX_ALLOWED_PORT);
446
+
syslog(LOG_WARNING, "Bootstrap node #%d: Invalid '%s': %d, should be in [%d, %d]. Skipping the node.\n", i, NAME_PORT,
447
+
bs_port, MIN_ALLOWED_PORT, MAX_ALLOWED_PORT);
435
448
goto next;
436
449
}
437
450
@@ -464,7 +477,7 @@ int bootstrap_from_config(char *cfg_file_path, DHT *dht, int enable_ipv6)
464
477
465
478
voidprint_public_key(uint8_t*public_key)
466
479
{
467
-
charbuffer[2*crypto_box_PUBLICKEYBYTES+1];
480
+
charbuffer[2*crypto_box_PUBLICKEYBYTES+1];
468
481
intindex=0;
469
482
470
483
inti;
@@ -500,7 +513,8 @@ int main(int argc, char *argv[])
0 commit comments