Repository navigation
Add host addressing mode for broker sockets - #1931
Merged
Weidong Cui (wdcui) merged 6 commits intoNov 27, 2026
Merged
Conversation
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/broker-socket-addressing
branch
from
November 23, 2026 15:31
0354be4 to
ecb76ed
Compare
Distinguish core-reserved guest endpoints from provider-bound host endpoints. Pass the destination policy verdict into connect, preserve retryable denials, and keep existing providers in isolated mode. Co-authored-by: Copilot <[email protected]> Copilot-Session: 0b6fd4b0-2ea1-49a9-adbb-739cd59c61ef
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/broker-socket-addressing
branch
from
November 26, 2026 18:57
ecb76ed to
8212c06
Compare
State that a served-only connect never reaches the host, that host addressing is TCP-only, when core passes a source lease, and which failed connects leave a stream free to retry. Describe isolated addressing without assuming host sockets. Co-authored-by: Copilot <[email protected]> Copilot-Session: 0b6fd4b0-2ea1-49a9-adbb-739cd59c61ef
In host addressing, core no longer binds an unbound stream to 0.0.0.0:0 before connect, which would take an ephemeral port exclusively. The provider binds at connect time and core records the address reported by PlatformSocket::local_address, which replaces release_connect_bind. A wildcard IP reported mid-connect is refined from later status. Co-authored-by: Copilot <[email protected]> Copilot-Session: 0b6fd4b0-2ea1-49a9-adbb-739cd59c61ef
Core refuses non-TCP sockets in host addressing, rejects multicast and limited broadcast endpoints a host-addressed provider reports, and renames the contract's types for clarity (SocketEgressVerdict, SocketBindRequest::Isolated, GuestSourceLease::with_port_owner). Co-authored-by: Copilot <[email protected]> Copilot-Session: 0b6fd4b0-2ea1-49a9-adbb-739cd59c61ef
Co-authored-by: Copilot <[email protected]> Copilot-Session: 0b6fd4b0-2ea1-49a9-adbb-739cd59c61ef
Cover that core keeps a with_port_owner lease's owner alive until the accepted host stream closes, and that host addressing still normalizes the unspecified destination and rejects multicast and broadcast ones. Drop host test assertions that only restate others. Co-authored-by: Copilot <[email protected]> Copilot-Session: 0b6fd4b0-2ea1-49a9-adbb-739cd59c61ef
Weidong Cui (wdcui)
marked this pull request as ready for review
November 27, 2026 01:07
|
🤖 SemverChecks 🤖 Click for details |
Weidong Cui (wdcui)
deleted the
wdcui/ulitebox/broker-socket-addressing
branch
November 27, 2026 01:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR lets a broker socket provider declare whether it uses isolated guest addresses or host addresses. With host addressing, which supports only TCP streams, the provider binds host sockets and reports the addresses the host assigns, including when it binds an unbound stream at connect. Core reserves no ports and passes the egress rule verdict into connect, so a destination the rules deny is reachable only at the provider's own listeners. Existing providers keep isolated addressing by default.