Skip to content

Fall back for invalid Node interface port IDs - #520

Open
shin4141 wants to merge 1 commit into
sony:masterfrom
shin4141:codex/sony-496-port-id-fallback
Open

Fall back for invalid Node interface port IDs#520
shin4141 wants to merge 1 commit into
sony:masterfrom
shin4141:codex/sony-496-port-id-fallback

Conversation

@shin4141

Copy link
Copy Markdown

Summary

  • use the repository's existing 00-00-00-00-00-00 fallback when a Node interface port ID cannot be represented in the IS-04 six-octet lowercase-hyphen form
  • leave valid port IDs unchanged
  • keep host discovery and interface membership unchanged

Fixes #496.

Why

Tunnel and virtual interfaces may expose non-6-octet link-layer addresses. Since interfaces[].port_id requires the IS-04 six-octet lowercase-hyphen form, those values can make the Node resource schema-invalid. This change addresses the invalid port_id path reported in #496 by applying the existing null-address fallback at serialization.

Verification

  • valid lowercase-hyphen port ID remains unchanged
  • empty, 4/5/7-octet, malformed-hex, uppercase, and colon-separated inputs use the fallback
  • focused tests: 3 test cases / 8 assertions
  • affected NodeInterface tests: 6 test cases / 21 assertions
  • full native suite: 186 test cases / 2597 assertions
  • git diff --check

Scope

The regression uses controlled inputs and does not claim a Linux tunl0 end-to-end reproduction. This PR does not claim a maintainer preference for normalize over exclude, Sony adoption or acceptance, or cross-platform execution beyond the tested macOS arm64 / Apple clang 21 environment.

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.

Node registration fails when host has tunnel/virtual interfaces with non-MAC port_id

1 participant