IPv6 bind_address wedges setup unrecoverably #4

Closed
opened 2026-08-11 10:25:36 +00:00 by aav · 0 comments
Owner

add_address (src/platform/macos.rs:107) always runs ifconfig <iface> inet <addr>/32 alias regardless of address family, and configured_addresses parses only IPv4 inet lines. Meanwhile plan() and bind_forward accept non-loopback IPv6 bind addresses (bind_forward even has an IPV6_BOUND_IF path).

Failure scenario: a context sets bind_address = "fd00::2". Config load and plan accept it. sudo silta setup creates feth99, then ifconfig feth99 inet fd00::2/32 alias fails with an address-family error, aborting setup after the interface exists but before /etc/hosts is written; re-running setup bails "feth99 already exists". Even if the alias were added as inet6, configured_addresses would never report it, so drift marks it permanently missing and silta run refuses to start, pointing at an update that cannot fix it.

Fix direction: either support IPv6 end to end (inet6 alias + inet6 parsing) or reject non-IPv4 bind addresses at config load with a clear error.

Source: high-effort code review, CONFIRMED. Area: setup/platform.

`add_address` (src/platform/macos.rs:107) always runs `ifconfig <iface> inet <addr>/32 alias` regardless of address family, and `configured_addresses` parses only IPv4 `inet ` lines. Meanwhile `plan()` and `bind_forward` accept non-loopback IPv6 bind addresses (bind_forward even has an IPV6_BOUND_IF path). **Failure scenario:** a context sets `bind_address = "fd00::2"`. Config load and plan accept it. `sudo silta setup` creates feth99, then `ifconfig feth99 inet fd00::2/32 alias` fails with an address-family error, aborting setup after the interface exists but before /etc/hosts is written; re-running setup bails "feth99 already exists". Even if the alias were added as inet6, `configured_addresses` would never report it, so drift marks it permanently missing and `silta run` refuses to start, pointing at an update that cannot fix it. **Fix direction:** either support IPv6 end to end (inet6 alias + inet6 parsing) or reject non-IPv4 bind addresses at config load with a clear error. Source: high-effort code review, CONFIRMED. Area: setup/platform.
aav self-assigned this 2026-08-11 10:27:24 +00:00
aav closed this issue 2026-08-11 11:03:14 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
carvers/silta#4
No description provided.