From 0c85b4ef5f406c51454b33ce22f0ce1585dbfb93 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 20 Nov 2014 13:42:18 -0800 Subject: [PATCH] Tweak to symmetric NAT buster to add one to the number of ports above the current one it attempts. --- node/Switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/Switch.cpp b/node/Switch.cpp index 7c63761b..6502656b 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -482,7 +482,7 @@ unsigned long Switch::doTimerTasks() * the original port one more time for good measure, since sometimes it * fails first time around. */ int p = (int)qi->inaddr.port() - 2; - for(int k=0;k<5;++k) { + for(int k=0;k<6;++k) { if ((p > 0)&&(p <= 0xffff)) { qi->inaddr.setPort((unsigned int)p); sendHELLO(qi->peer,qi->inaddr);