summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnodegen2
-rw-r--r--ratox.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/nodegen b/nodegen
index 4133e3d..12c2fec 100755
--- a/nodegen
+++ b/nodegen
@@ -7,6 +7,6 @@ jq --tab '[.nodes[] |
select(.last_ping > 0) |
select(.tcp_ports | length > 0) |
{".addr4": .ipv4, ".addr6": .ipv6, ".udp_port": .port, ".tcp_port": .tcp_ports[0], ".idstr": .public_key}]' |
-sed 's/"-"/NULL/; s/"\(\.[0-9a-z_]\+\)":/\1 =/; 1d; $d'
+sed 's/"-"/NULL/; s/"NONE"/NULL/; s/"\(\.[0-9a-z_]\+\)":/\1 =/; 1d; $d'
echo '};'
diff --git a/ratox.c b/ratox.c
index 7a27832..f877205 100644
--- a/ratox.c
+++ b/ratox.c
@@ -1482,7 +1482,7 @@ toxconnect(void)
for (i = 0; i < LEN(nodes); i++) {
n = &nodes[i];
- if (ipv6 && !n->addr6)
+ if ((ipv6 && !n->addr6) || (!ipv6 && !n->addr4))
continue;
str2id(n->idstr, id);
r = tox_bootstrap(tox, ipv6 ? n->addr6 : n->addr4, n->udp_port, id, NULL);