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

This commit is contained in:
Adam Ierymenko 2014-11-20 13:42:18 -08:00
parent ee9e6a3c6b
commit 0c85b4ef5f

View File

@ -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);