summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-10-01 15:40:54 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-10-01 15:40:54 -0700
commit5076c49210542243075556aa1ab74f33d4d50ba3 (patch)
tree6e026aec5b56c82aaf30939fb00879e03a1ca23f /service
parent72e7e36a5b6eadcb9c2ce016269ef5bc9a54b13c (diff)
downloadinfinitytier-5076c49210542243075556aa1ab74f33d4d50ba3.tar.gz
infinitytier-5076c49210542243075556aa1ab74f33d4d50ba3.zip
Peer serialization and related changes.
Diffstat (limited to 'service')
-rw-r--r--service/OneService.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 7b3c4ff6..4b374cd7 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -489,13 +489,12 @@ public:
OSUtils::writeFile((_homePath + ZT_PATH_SEPARATOR_S + "zerotier-one.port").c_str(),std::string(portstr));
#ifdef ZT_USE_MINIUPNPC
- // Bind a random secondary port for use with uPnP, since some NAT routers
+ // Bind a secondary port for use with uPnP, since some NAT routers
// (cough Ubiquity Edge cough) barf up a lung if you do both conventional
// NAT-t and uPnP from behind the same port. I think this is a bug, but
// everyone else's router bugs are our problem. :P
for(int k=0;k<512;++k) {
- unsigned int upnport = 40000 + (((port + 1) * (k + 1)) % 25500);
-
+ const unsigned int upnport = 40000 + (((port + 1) * (k + 1)) % 25500);
_v4UpnpLocalAddress = InetAddress(0,upnport);
_v4UpnpUdpSocket = _phy.udpBind((const struct sockaddr *)&_v4UpnpLocalAddress,reinterpret_cast<void *>(&_v4UpnpLocalAddress),131072);
if (_v4UpnpUdpSocket) {