Dedicated-address predicate duplicated in four places #8

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

The dedicated-address predicate (is_unspecified() || is_loopback()) is duplicated in src/main.rs:244, src/skill.rs:99, negated at src/skill.rs:192, with a variant in src/setup.rs:42.

Failure scenario: four independently maintained copies of what counts as a dedicated address. If one gains a case (e.g. IPv6 loopback ::1 handling) the others do not, and describe prints a .silta.internal host name for a forward that run() binds as plain loopback without the lo0 restriction.

Fix direction: a single ResolvedForward::has_dedicated_address() method removes the drift.

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

The dedicated-address predicate (`is_unspecified() || is_loopback()`) is duplicated in src/main.rs:244, src/skill.rs:99, negated at src/skill.rs:192, with a variant in src/setup.rs:42. **Failure scenario:** four independently maintained copies of what counts as a dedicated address. If one gains a case (e.g. IPv6 loopback ::1 handling) the others do not, and describe prints a `.silta.internal` host name for a forward that `run()` binds as plain loopback without the lo0 restriction. **Fix direction:** a single `ResolvedForward::has_dedicated_address()` method removes the drift. Source: high-effort code review, CONFIRMED. Area: config.
aav self-assigned this 2026-08-11 10:27:24 +00:00
aav closed this issue 2026-08-11 11:03:15 +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#8
No description provided.