Repository navigation
Record the session interface as unknown instead of guessing eth0 - #196
Merged
Merged
Conversation
With no default route, detect_active_interface() returned "eth0", so the session lock, the start message and the watchdog's log named an interface that may not exist. The interface is only a label - the DNS overlay and the rules are system-wide - so it is now None when detection fails, including when `ip` times out or is missing. apply_dns() no longer takes the interface it never read, and the watchdog's is_interface_online() and has_default_route(), called only by their tests, are gone. `--interface` keeps working and says it is for diagnostics only. Fixes #194. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
…-label Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #194.
With no default route,
detect_active_interface()returned"eth0". The session lock, the start message and the watchdog's log then named an interface that may not exist. The interface is only a label: the DNS overlay and the firewall rules apply to the whole system.Changes
detect_active_interface()returnsNonewhen it cannot find an interface. That covers no default route,iptiming out, andipmissing. The session then records the interface asunknown.apply_dns()loses itsinterfaceparameter, which it never read.is_interface_online()andhas_default_route()are removed. Only their own tests called them.ttp start/restart --interfacestill works. Its help text now says the value is recorded for diagnostics only and that TTP applies to every interface.docs/interfaces.md, the CLI reference and the DNSSEC how-to.Tests
detect_active_interface()returnsNonewith no default route, wheniptimes out, and whenipis missing.ttp startwithout a default route records no interface and prints noeth0.🤖 Generated with Claude Code