diff --git a/node/Peer.cpp b/node/Peer.cpp index 2040a3b4d..39792eb06 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -536,8 +536,10 @@ unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now) performMultipathStateCheck(tPtr, now); + char buf[64]; const bool sendFullHello = ((now - _lastSentFullHello) >= ZT_PEER_PING_PERIOD); if (sendFullHello) { + fprintf(stderr, "sendFullHello %s \n", _id.address().toString(buf)); _lastSentFullHello = now; } diff --git a/service/OneService.cpp b/service/OneService.cpp index 1ffab2299..cb193776c 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1178,6 +1178,7 @@ class OneServiceImpl : public OneService // Refresh bindings in case device's interfaces have changed, and also sync routes to update any shadow routes (e.g. shadow default) if (((now - lastBindRefresh) >= (_node->bondController()->inUse() ? ZT_BINDER_REFRESH_PERIOD / 4 : ZT_BINDER_REFRESH_PERIOD))||restarted) { + fprintf(stderr, "binder refresh\n"); // If secondary port is not configured to a constant value and we've been offline for a while, // bind a new secondary port. This is a workaround for a "coma" issue caused by buggy NATs that stop @@ -1189,6 +1190,9 @@ class OneServiceImpl : public OneService else if (now - lastOnline > (ZT_PEER_PING_PERIOD * 2) || restarted) { lastOnline = now; // don't keep changing the port before we have a chance to connect _ports[1] = _getRandomPort(); + + // TODO delete + fprintf(stderr, "randomized secondary port. Now it's %d\n", _ports[1]); } }