working commit
This commit is contained in:
+8
-1
@@ -29,7 +29,14 @@ std::expected<void, std::string> TunService::Init(void) {
|
||||
if (!netprefixRes) {
|
||||
return std::unexpected(networkRes.error());
|
||||
};
|
||||
|
||||
auto prefix = netprefixRes.value();
|
||||
auto netaddr = networkRes.value();
|
||||
auto totalHostsRes = netcapa(netaddr, prefix);
|
||||
if (!totalHostsRes) {
|
||||
return std::unexpected(totalHostsRes.error());
|
||||
};
|
||||
auto totalNets = totalHostsRes.value() / 4;
|
||||
uxlogger.Debug(std::format("Total networks: {}", totalNets));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user