mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-03-10 22:44:21 +00:00
self hosted controller JSON format fix for DNS
This commit is contained in:
parent
7d8cfb1fee
commit
ff23d3051f
@ -1031,25 +1031,21 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpPOST(
|
|||||||
|
|
||||||
if (b.count("dns")) {
|
if (b.count("dns")) {
|
||||||
json &dns = b["dns"];
|
json &dns = b["dns"];
|
||||||
if (dns.is_array()) {
|
if (dns.is_object()) {
|
||||||
json nda = json::array();
|
json nd;
|
||||||
for(unsigned int i=0;i<dns.size();++i) {
|
|
||||||
json &d = dns[i];
|
nd["domain"] = dns["domain"];
|
||||||
if (d.is_object()) {
|
|
||||||
json nd = json::object();
|
json &srv = dns["servers"];
|
||||||
nd["domain"] = d["domain"];
|
if (srv.is_array()) {
|
||||||
json &srv = d["servers"];
|
json ns = json::array();
|
||||||
if (srv.is_array()) {
|
for(unsigned int i=0;i<srv.size();++i) {
|
||||||
json ns = json::array();
|
ns.push_back(srv[i]);
|
||||||
for(unsigned int j=0;j<srv.size();++j) {
|
|
||||||
ns.push_back(srv[i]);
|
|
||||||
}
|
|
||||||
nd["servers"] = ns;
|
|
||||||
}
|
|
||||||
nda.push_back(nd);
|
|
||||||
}
|
}
|
||||||
|
nd["servers"] = ns;
|
||||||
}
|
}
|
||||||
network["dns"] = nda;
|
|
||||||
|
network["dns"] = nd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user