mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 17:52:28 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -24,9 +24,6 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
for(const auto &Endpoint:Endpoints) {
|
for(const auto &Endpoint:Endpoints) {
|
||||||
GWObjects::RadiusProxyPool PP;
|
GWObjects::RadiusProxyPool PP;
|
||||||
auto & AUTH = PP.authConfig;
|
|
||||||
auto & ACCT = PP.acctConfig;
|
|
||||||
auto & COA = PP.coaConfig;
|
|
||||||
|
|
||||||
PP.name = Endpoint.info.name;
|
PP.name = Endpoint.info.name;
|
||||||
PP.description = Endpoint.info.description;
|
PP.description = Endpoint.info.description;
|
||||||
@@ -40,9 +37,9 @@ namespace OpenWifi {
|
|||||||
PP.radsecPoolType="orion";
|
PP.radsecPoolType="orion";
|
||||||
ProvObjects::GooglOrionAccountInfo OA;
|
ProvObjects::GooglOrionAccountInfo OA;
|
||||||
if(StorageService()->OrionAccountsDB().GetRecord("id", Endpoint.RadsecServers[0].UseOpenRoamingAccount, OA)) {
|
if(StorageService()->OrionAccountsDB().GetRecord("id", Endpoint.RadsecServers[0].UseOpenRoamingAccount, OA)) {
|
||||||
for(auto ServerType:{ AUTH, ACCT, COA}) {
|
for(auto *ServerType:{&PP.authConfig, &PP.acctConfig, &PP.coaConfig}) {
|
||||||
ServerType.monitor = false;
|
ServerType->monitor = false;
|
||||||
ServerType.strategy = Endpoint.PoolStrategy;
|
ServerType->strategy = Endpoint.PoolStrategy;
|
||||||
int i=1;
|
int i=1;
|
||||||
for (const auto &Server: Svrs) {
|
for (const auto &Server: Svrs) {
|
||||||
GWObjects::RadiusProxyServerEntry PE;
|
GWObjects::RadiusProxyServerEntry PE;
|
||||||
@@ -59,7 +56,7 @@ namespace OpenWifi {
|
|||||||
PE.allowSelfSigned = false;
|
PE.allowSelfSigned = false;
|
||||||
PE.weight = 10;
|
PE.weight = 10;
|
||||||
PE.secret = PE.radsecSecret = "radsec";
|
PE.secret = PE.radsecSecret = "radsec";
|
||||||
ServerType.servers.emplace_back(PE);
|
ServerType->servers.emplace_back(PE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Pools.pools.emplace_back(PP);
|
Pools.pools.emplace_back(PP);
|
||||||
@@ -71,9 +68,9 @@ namespace OpenWifi {
|
|||||||
ProvObjects::GLBLRAccountInfo GRAccountInfo;
|
ProvObjects::GLBLRAccountInfo GRAccountInfo;
|
||||||
if( StorageService()->GLBLRCertsDB().GetRecord("id",Endpoint.RadsecServers[0].UseOpenRoamingAccount,GRCertificate) &&
|
if( StorageService()->GLBLRCertsDB().GetRecord("id",Endpoint.RadsecServers[0].UseOpenRoamingAccount,GRCertificate) &&
|
||||||
StorageService()->GLBLRAccountInfoDB().GetRecord("id",GRCertificate.accountId,GRAccountInfo)) {
|
StorageService()->GLBLRAccountInfoDB().GetRecord("id",GRCertificate.accountId,GRAccountInfo)) {
|
||||||
for(auto ServerType:{ AUTH, ACCT, COA}) {
|
for(auto *ServerType:{&PP.authConfig, &PP.acctConfig, &PP.coaConfig}) {
|
||||||
ServerType.monitor = false;
|
ServerType->monitor = false;
|
||||||
ServerType.strategy = Endpoint.PoolStrategy;
|
ServerType->strategy = Endpoint.PoolStrategy;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (const auto &Server: Svrs) {
|
for (const auto &Server: Svrs) {
|
||||||
GWObjects::RadiusProxyServerEntry PE;
|
GWObjects::RadiusProxyServerEntry PE;
|
||||||
@@ -88,16 +85,16 @@ namespace OpenWifi {
|
|||||||
PE.allowSelfSigned = false;
|
PE.allowSelfSigned = false;
|
||||||
PE.weight = 10;
|
PE.weight = 10;
|
||||||
PE.secret = PE.radsecSecret = "radsec";
|
PE.secret = PE.radsecSecret = "radsec";
|
||||||
ServerType.servers.emplace_back(PE);
|
ServerType->servers.emplace_back(PE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Pools.pools.emplace_back(PP);
|
Pools.pools.emplace_back(PP);
|
||||||
}
|
}
|
||||||
} else if(Endpoint.Type=="radsec" && !Endpoint.RadsecServers.empty()) {
|
} else if(Endpoint.Type=="radsec" && !Endpoint.RadsecServers.empty()) {
|
||||||
PP.radsecPoolType="radsec";
|
PP.radsecPoolType="radsec";
|
||||||
for(auto ServerType:{ AUTH, ACCT, COA}) {
|
for(auto *ServerType:{&PP.authConfig, &PP.acctConfig, &PP.coaConfig}) {
|
||||||
ServerType.monitor = false;
|
ServerType->monitor = false;
|
||||||
ServerType.strategy = Endpoint.PoolStrategy;
|
ServerType->strategy = Endpoint.PoolStrategy;
|
||||||
for (const auto &Server: Endpoint.RadsecServers) {
|
for (const auto &Server: Endpoint.RadsecServers) {
|
||||||
GWObjects::RadiusProxyServerEntry PE;
|
GWObjects::RadiusProxyServerEntry PE;
|
||||||
PE.radsecCert = Utils::base64encode((const u_char *)Server.Certificate.c_str(), Server.Certificate.size());
|
PE.radsecCert = Utils::base64encode((const u_char *)Server.Certificate.c_str(), Server.Certificate.size());
|
||||||
@@ -115,7 +112,7 @@ namespace OpenWifi {
|
|||||||
PE.allowSelfSigned = false;
|
PE.allowSelfSigned = false;
|
||||||
PE.weight = 10;
|
PE.weight = 10;
|
||||||
PE.secret = PE.radsecSecret = "radsec";
|
PE.secret = PE.radsecSecret = "radsec";
|
||||||
ServerType.servers.emplace_back(PE);
|
ServerType->servers.emplace_back(PE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Pools.pools.emplace_back(PP);
|
Pools.pools.emplace_back(PP);
|
||||||
|
|||||||
Reference in New Issue
Block a user