Skip to content

Misc API bug fixes, update examples, documentation and build scripts - #293

Open
joseph-henry wants to merge 1 commit into
mainfrom
misc-fixes
Open

Misc API bug fixes, update examples, documentation and build scripts#293
joseph-henry wants to merge 1 commit into
mainfrom
misc-fixes

Conversation

@joseph-henry

@joseph-henry joseph-henry commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

WIP -- Still validating, more to come

This gets the repo building again from a clean clone and clears out a batch of API bugs along the way. The main change is updating the bundled ZeroTierOne core from 1.12 to 1.16.2, which is what was breaking ./build.sh host for anyone on a recent compiler. The old pin shipped a copy of prometheus-cpp-lite that used std::invalid_argument without including <stdexcept> (fixes #284, fixes #269).

The API delta between those two versions of ZTO turned out to be small, mostly a new node config parameter and the C25519 to ECC rename.

Several paths in Central.cpp, NodeService.cpp, and VirtualTap.cpp copied caller- or peer-controlled lengths into fixed-size buffers with no bounds check, including an Ethernet frame length that could underflow to roughly 4GB (supersedes #287).

The C# bindings were truncating node IDs that begin with a zero and ignoring the size argument to Socket.Send/Receive while handing an unpinned array to native code (fixes #274, fixes #257, supersedes #275 and #276).

The remainder is mostly cleanup: build.sh now fails properly instead of exiting 0 when the build fails, the C examples had a few bugs fixed: An uninitialized fd, two misplaced parens that swallowed error codes, an unbounded memcpy. Also improved documentation a bit with --help output instead of a sibling README.

Fixes #284
Fixes #269
Addresses concern in #121
Fixes #274
Fixes #257

Supersedes #287, #275, #276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot build basic zt C# node.IdString can leave out leading zeroes Script fail in Ubuntu .NET binding: Socket.Send behavior is unexpected

1 participant