From 4e689998f9b9e2c1de9000c8ca7bfa519f5ceb77 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 12 Jan 2018 10:38:19 -0800 Subject: Sanity checks on array sizes and fix a bug in IPv4 auto-assign. --- controller/DB.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'controller/DB.cpp') diff --git a/controller/DB.cpp b/controller/DB.cpp index 7b792eb4..70472e57 100644 --- a/controller/DB.cpp +++ b/controller/DB.cpp @@ -373,8 +373,10 @@ void DB::_fillSummaryInfo(const std::shared_ptr<_Network> &nw,NetworkSummaryInfo { for(auto ab=nw->activeBridgeMembers.begin();ab!=nw->activeBridgeMembers.end();++ab) info.activeBridges.push_back(Address(*ab)); + std::sort(info.activeBridges.begin(),info.activeBridges.end()); for(auto ip=nw->allocatedIps.begin();ip!=nw->allocatedIps.end();++ip) info.allocatedIps.push_back(*ip); + std::sort(info.allocatedIps.begin(),info.allocatedIps.end()); info.authorizedMemberCount = (unsigned long)nw->authorizedMembers.size(); info.totalMemberCount = (unsigned long)nw->members.size(); info.mostRecentDeauthTime = nw->mostRecentDeauthTime; -- cgit v1.2.3