teardown strands the boot daemon when config no longer has dedicated addresses #2

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

apply_teardown (src/setup.rs:389) returns early when the current config has no dedicated addresses, skipping remove_boot_daemon and the /etc/hosts block removal. An installed boot daemon then survives the teardown the README says always removes it.

Failure scenario: user does sudo silta setup --persistent, later rewrites the config to plain 127.0.0.1 forwards (dropping bind_address), then runs sudo silta teardown to clean up. plan() is empty, teardown prints "nothing to remove" and exits without touching the LaunchDaemon plist, the feth99 interface, or the /etc/hosts block. The root boot daemon keeps running setup with the new config at every boot, and there is no silta command left that will remove it.

Fix direction: teardown should remove the daemon and any existing hosts block by interface name regardless of whether the current config declares dedicated addresses.

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

`apply_teardown` (src/setup.rs:389) returns early when the current config has no dedicated addresses, skipping `remove_boot_daemon` and the /etc/hosts block removal. An installed boot daemon then survives the teardown the README says always removes it. **Failure scenario:** user does `sudo silta setup --persistent`, later rewrites the config to plain 127.0.0.1 forwards (dropping bind_address), then runs `sudo silta teardown` to clean up. `plan()` is empty, teardown prints "nothing to remove" and exits without touching the LaunchDaemon plist, the feth99 interface, or the /etc/hosts block. The root boot daemon keeps running setup with the new config at every boot, and there is no silta command left that will remove it. **Fix direction:** teardown should remove the daemon and any existing hosts block by interface name regardless of whether the current config declares dedicated addresses. Source: high-effort code review, CONFIRMED. Area: setup.
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#2
No description provided.