mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 12:06:55 +02:00
Don't allow zero as a network number.
This commit is contained in:
parent
88949a750f
commit
d27c14af48
1 changed files with 2 additions and 0 deletions
|
@ -778,6 +778,8 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST(
|
|||
uint64_t nwidOriginalPostfix = nwidPostfix;
|
||||
do {
|
||||
uint64_t tryNwid = nwidPrefix | nwidPostfix;
|
||||
if (!nwidPostfix)
|
||||
tryNwid |= 1;
|
||||
Utils::snprintf(nwids,sizeof(nwids),"%.16llx",(unsigned long long)tryNwid);
|
||||
|
||||
sqlite3_reset(_sGetNetworkRevision);
|
||||
|
|
Loading…
Add table
Reference in a new issue