mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-18 15:18:17 +00:00
Don't allow zero as a network number.
This commit is contained in:
@ -778,6 +778,8 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST(
|
|||||||
uint64_t nwidOriginalPostfix = nwidPostfix;
|
uint64_t nwidOriginalPostfix = nwidPostfix;
|
||||||
do {
|
do {
|
||||||
uint64_t tryNwid = nwidPrefix | nwidPostfix;
|
uint64_t tryNwid = nwidPrefix | nwidPostfix;
|
||||||
|
if (!nwidPostfix)
|
||||||
|
tryNwid |= 1;
|
||||||
Utils::snprintf(nwids,sizeof(nwids),"%.16llx",(unsigned long long)tryNwid);
|
Utils::snprintf(nwids,sizeof(nwids),"%.16llx",(unsigned long long)tryNwid);
|
||||||
|
|
||||||
sqlite3_reset(_sGetNetworkRevision);
|
sqlite3_reset(_sGetNetworkRevision);
|
||||||
|
Reference in New Issue
Block a user