Browse Source

Tweak to symmetric NAT buster to add one to the number of ports above the current one it attempts.

Adam Ierymenko 10 years ago
parent
commit
0c85b4ef5f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      node/Switch.cpp

+ 1 - 1
node/Switch.cpp

@@ -482,7 +482,7 @@ unsigned long Switch::doTimerTasks()
 					 * the original port one more time for good measure, since sometimes it
 					 * the original port one more time for good measure, since sometimes it
 					 * fails first time around. */
 					 * fails first time around. */
 					int p = (int)qi->inaddr.port() - 2;
 					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)) {
 						if ((p > 0)&&(p <= 0xffff)) {
 							qi->inaddr.setPort((unsigned int)p);
 							qi->inaddr.setPort((unsigned int)p);
 							sendHELLO(qi->peer,qi->inaddr);
 							sendHELLO(qi->peer,qi->inaddr);