mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-21 18:06:39 +00:00
Forgot to run schema2c.
This commit is contained in:
parent
ddebe2d4c7
commit
e4046964f0
@ -776,7 +776,7 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpGET(
|
|||||||
return 200;
|
return 200;
|
||||||
} // else 404
|
} // else 404
|
||||||
|
|
||||||
}
|
} // else 404
|
||||||
|
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
@ -793,6 +793,33 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST(
|
|||||||
return 404;
|
return 404;
|
||||||
Mutex::Lock _l(_lock);
|
Mutex::Lock _l(_lock);
|
||||||
|
|
||||||
|
if (path[0] == "network") {
|
||||||
|
|
||||||
|
if ((path.size() >= 2)&&(path[1].length() == 16)) {
|
||||||
|
uint64_t nwid = Utils::hexStrToU64(path[1].c_str());
|
||||||
|
char nwids[24];
|
||||||
|
Utils::snprintf(nwids,sizeof(nwids),"%.16llx",(unsigned long long)nwid);
|
||||||
|
|
||||||
|
if (path.size() >= 3) {
|
||||||
|
if ((path.size() == 4)&&(path[2] == "member")&&(path[3].length() == 10)) {
|
||||||
|
uint64_t address = Utils::hexStrToU64(path[3].c_str());
|
||||||
|
char addrs[24];
|
||||||
|
Utils::snprintf(addrs,sizeof(addrs),"%.10llx",address);
|
||||||
|
|
||||||
|
} else if (path[2] == "rule") {
|
||||||
|
|
||||||
|
|
||||||
|
} else if (path[2] == "ipAssignmentPool") {
|
||||||
|
|
||||||
|
} // else 404
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} // else 404
|
||||||
|
|
||||||
|
} // else 404
|
||||||
|
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,9 +72,11 @@
|
|||||||
"CREATE TABLE Relay (\n"\
|
"CREATE TABLE Relay (\n"\
|
||||||
" networkId char(16) NOT NULL,\n"\
|
" networkId char(16) NOT NULL,\n"\
|
||||||
" nodeId char(10) NOT NULL,\n"\
|
" nodeId char(10) NOT NULL,\n"\
|
||||||
" address varchar(64) NOT NULL\n"\
|
" phyAddress varchar(64) NOT NULL\n"\
|
||||||
");\n"\
|
");\n"\
|
||||||
"\n"\
|
"\n"\
|
||||||
|
"CREATE INDEX Relay_networkId ON Relay (networkId);\n"\
|
||||||
|
"\n"\
|
||||||
"CREATE UNIQUE INDEX Relay_networkId_nodeId ON Relay (networkId, nodeId);\n"\
|
"CREATE UNIQUE INDEX Relay_networkId_nodeId ON Relay (networkId, nodeId);\n"\
|
||||||
"\n"\
|
"\n"\
|
||||||
"CREATE TABLE Node (\n"\
|
"CREATE TABLE Node (\n"\
|
||||||
@ -87,6 +89,7 @@
|
|||||||
"\n"\
|
"\n"\
|
||||||
"CREATE TABLE Rule (\n"\
|
"CREATE TABLE Rule (\n"\
|
||||||
" networkId char(16) NOT NULL,\n"\
|
" networkId char(16) NOT NULL,\n"\
|
||||||
|
" ordering integer NOT NULL DEFAULT(0),\n"\
|
||||||
" nodeId char(10),\n"\
|
" nodeId char(10),\n"\
|
||||||
" vlanId integer,\n"\
|
" vlanId integer,\n"\
|
||||||
" vlanPcp integer,\n"\
|
" vlanPcp integer,\n"\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user