summaryrefslogtreecommitdiff
path: root/controller/SqliteNetworkController.cpp
diff options
context:
space:
mode:
authorKees Bos <k.bos@capitar.com>2015-06-18 19:14:52 +0200
committerKees Bos <k.bos@capitar.com>2015-06-18 19:14:52 +0200
commit16eae132faf19ffa74a591c92bf0d6972aa1bc01 (patch)
tree05e8398b1d9cadaa8ed3a09be7dc58e898781708 /controller/SqliteNetworkController.cpp
parentbe4f08a548556bd6e7f22bc48035d11aa319fae8 (diff)
downloadinfinitytier-16eae132faf19ffa74a591c92bf0d6972aa1bc01.tar.gz
infinitytier-16eae132faf19ffa74a591c92bf0d6972aa1bc01.zip
Fix for ipv4 assignment
Diffstat (limited to 'controller/SqliteNetworkController.cpp')
-rw-r--r--controller/SqliteNetworkController.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp
index 50927722..398b6991 100644
--- a/controller/SqliteNetworkController.cpp
+++ b/controller/SqliteNetworkController.cpp
@@ -519,7 +519,7 @@ NetworkController::ResultCode SqliteNetworkController::doNetworkConfigRequest(co
int ipNetmaskBits = sqlite3_column_int(_sGetIpAssignmentsForNode,1);
if ((ip)&&(sqlite3_column_bytes(_sGetIpAssignmentsForNode,0) >= 4)&&(ipNetmaskBits > 0)&&(ipNetmaskBits <= 32)) {
char tmp[32];
- Utils::snprintf(tmp,sizeof(tmp),"%d.%d.%d.%d/%d",(int)ip[0],(int)ip[1],(int)ip[2],(int)ip[3],ipNetmaskBits);
+ Utils::snprintf(tmp,sizeof(tmp),"%d.%d.%d.%d/%d",(int)ip[12+0],(int)ip[12+1],(int)ip[12+2],(int)ip[12+3],ipNetmaskBits);
if (v4s.length())
v4s.push_back(',');
v4s.append(tmp);