From 810e2a761fe08ea812e34b7959651a0eb881e20a Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 25 May 2021 14:49:06 -0400 Subject: [PATCH] Fix authentication URL... --- node/Network.cpp | 3 ++- node/Network.hpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/node/Network.cpp b/node/Network.cpp index e2b033770..f8d204de4 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -1022,6 +1022,7 @@ int Network::setConfiguration(void *tPtr,const NetworkConfig &nconf,bool saveToD } _portError = RR->node->configureVirtualNetworkPort(tPtr,_id,&_uPtr,(oldPortInitialized) ? ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE : ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_UP,&ctmp); + _authenticationURL = nconf.authenticationURL; if (saveToDisk) { Dictionary *const d = new Dictionary(); @@ -1432,7 +1433,7 @@ void Network::_externalConfig(ZT_VirtualNetworkConfig *ec) const memcpy(&ec->dns, &_config.dns, sizeof(ZT_VirtualNetworkDNS)); - Utils::scopy(ec->authenticationURL, sizeof(ec->authenticationURL), _config.authenticationURL); + Utils::scopy(ec->authenticationURL, sizeof(ec->authenticationURL), _authenticationURL.c_str()); ec->authenticationExpiryTime = _config.authenticationExpiryTime; } diff --git a/node/Network.hpp b/node/Network.hpp index 38933a4d7..e713a5451 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -227,7 +227,7 @@ public: { Mutex::Lock _l(_lock); _netconfFailure = NETCONF_FAILURE_AUTHENTICATION_REQUIRED; - _authorizationURL = (url) ? url : ""; + _authenticationURL = (url) ? url : ""; } /** @@ -449,7 +449,7 @@ private: NETCONF_FAILURE_AUTHENTICATION_REQUIRED } _netconfFailure; int _portError; // return value from port config callback - std::string _authorizationURL; + std::string _authenticationURL; Hashtable _memberships;