Skip to content

Add shared guest IPv4 identity - #1210

Merged
Weidong Cui (wdcui) merged 7 commits into
uliteboxfrom
wdcui/ulitebox/shared-pod-ipv4-identity
Aug 20, 2026
Merged

Add shared guest IPv4 identity#1210
Weidong Cui (wdcui) merged 7 commits into
uliteboxfrom
wdcui/ulitebox/shared-pod-ipv4-identity

Conversation

@wdcui

@wdcui Weidong Cui (wdcui) commented Aug 20, 2026

Copy link
Copy Markdown
Member

This PR adds the fixed shared guest IPv4 identity 10.0.2.15 to the existing broker-wide TCP and UDP namespaces, simplifies socket policy into independent per-protocol settings, supports exact and wildcard guest bindings with destination-correct source addresses, and makes unmatched private guest destinations fail closed without changing native endpoint lifecycle or gateway routing.

@wdcui Weidong Cui (wdcui) changed the title Add shared Pod IPv4 identity Add shared guest IPv4 identity Aug 20, 2026
@wdcui
Weidong Cui (wdcui) force-pushed the wdcui/ulitebox/shared-pod-ipv4-identity branch from b8b9f4a to 6aaedf6 Compare August 20, 2026 18:03
@wdcui
Weidong Cui (wdcui) force-pushed the wdcui/ulitebox/shared-pod-ipv4-identity branch from 06990d0 to 6aaedf6 Compare August 20, 2026 19:02
Extend the broker-wide guest TCP and UDP namespaces with the fixed 10.0.2.15 identity while preserving existing native routing behavior. Derive wildcard guest source addresses per destination and keep private-address misses from falling through to native endpoints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Represent TCP and UDP admission independently instead of enumerating every protocol combination. Keep destination storage internal and use empty per-protocol policies for guest-network-only access.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Reserve 10.0.2.15 directly for an unbound TCP connection to the shared guest address instead of reserving an unnecessarily broad wildcard binding.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Select the guest-visible source IP first and construct the ephemeral endpoint once, removing the one-use default TCP local endpoint constant.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Mark the TCP and UDP routing checks for simplification once gateway routing allows every unmatched guest-network destination to fail closed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Replace protocol-combination constructors with independent TCP and UDP policy setters. Callers now choose deny or guest-network baseline explicitly and configure only the protocol rules they need.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Allow a wildcard UDP binding to adopt each successful peer replacement's same-port platform address while keeping exact bindings fixed. Cover reconnecting from the private guest address to loopback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
@wdcui
Weidong Cui (wdcui) force-pushed the wdcui/ulitebox/shared-pod-ipv4-identity branch from 6aaedf6 to 6ae6d2b Compare August 20, 2026 19:54
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure enum_changed_kind: pub enum changed kind ---

Description:
A public enum has been replaced by a different kind of item at the same path, which breaks code that relied on the enum's variants and representation.
        ref: https://github.com/obi1kenobi/cargo-semver-checks/issues/302
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_changed_kind.ron

Failed in:
  enum litebox_broker_core::SocketPolicy became struct in /home/runner/work/litebox/litebox/litebox_broker_core/src/policy.rs:203

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/inherent_method_missing.ron

Failed in:
  SocketPolicy::from_tcp_destination_rules, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/2e2200484433d69afbe19fe0f944c7bebd727b1a/litebox_broker_core/src/policy.rs:228
  SocketPolicy::from_udp_destination_rules, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/2e2200484433d69afbe19fe0f944c7bebd727b1a/litebox_broker_core/src/policy.rs:235
  SocketPolicy::from_tcp_udp_destination_rules, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/2e2200484433d69afbe19fe0f944c7bebd727b1a/litebox_broker_core/src/policy.rs:243

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/struct_missing.ron

Failed in:
  struct litebox_broker_core::DestinationPolicy, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/2e2200484433d69afbe19fe0f944c7bebd727b1a/litebox_broker_core/src/policy.rs:177

@wdcui
Weidong Cui (wdcui) added this pull request to the merge queue Aug 20, 2026
Merged via the queue into ulitebox with commit 0de1f37 Aug 20, 2026
7 checks passed
@wdcui
Weidong Cui (wdcui) deleted the wdcui/ulitebox/shared-pod-ipv4-identity branch August 20, 2026 20:05
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.

1 participant