summaryrefslogtreecommitdiff
path: root/controller/EmbeddedNetworkController.cpp
diff options
context:
space:
mode:
authorGrant Limberg <[email protected]>2021-06-04 11:39:52 -0700
committerGrant Limberg <[email protected]>2021-06-04 11:39:52 -0700
commit7ca2ecb42111f43a26dacbabbd0db6ba4b32b19d (patch)
tree8f0d120e4c480af36976595d4c0e7aa8b0ed6233 /controller/EmbeddedNetworkController.cpp
parent1dcfc03cbce0142cb40f26e5bc2ecdd7543de3ad (diff)
put expiry time back on nc object
Diffstat (limited to 'controller/EmbeddedNetworkController.cpp')
-rw-r--r--controller/EmbeddedNetworkController.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp
index 4ce6d234..47c18a77 100644
--- a/controller/EmbeddedNetworkController.cpp
+++ b/controller/EmbeddedNetworkController.cpp
@@ -1345,6 +1345,8 @@ void EmbeddedNetworkController::_request(
authInfo.add("aU", authenticationURL.c_str());
}
fprintf(stderr, "sending auth URL: %s\n", authenticationURL.c_str());
+ DB::cleanMember(member);
+ _db.save(member,true);
_sender->ncSendError(nwid,requestPacketId,identity.address(),NetworkController::NC_ERROR_AUTHENTICATION_REQUIRED, authInfo.data(), authInfo.sizeBytes());
return;
}
@@ -1414,10 +1416,8 @@ void EmbeddedNetworkController::_request(
nc->mtu = std::max(std::min((unsigned int)OSUtils::jsonInt(network["mtu"],ZT_DEFAULT_MTU),(unsigned int)ZT_MAX_MTU),(unsigned int)ZT_MIN_MTU);
nc->multicastLimit = (unsigned int)OSUtils::jsonInt(network["multicastLimit"],32ULL);
- // TODO: Decide what to do with these, or if to remove them
- // they don't make sense here as is.
- // Utils::scopy(nc->authenticationURL, sizeof(nc->authenticationURL), authenticationURL.c_str());
- // nc->authenticationExpiryTime = authenticationExpiryTime;
+ nc->authenticationExpiryTime = OSUtils::jsonInt(member["authenticationExpiryTime"], 0Ll);
+
std::string rtt(OSUtils::jsonString(member["remoteTraceTarget"],""));
if (rtt.length() == 10) {