Skip to content

Record the session interface as unknown instead of guessing eth0 - #196

Merged
onyks-os merged 2 commits into
mainfrom
fix/session-interface-label
Nov 30, 2026
Merged

onyks-os merged 2 commits into
mainfrom
fix/session-interface-label

Conversation

@onyks-os

Copy link
Copy Markdown
Owner

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() returns None when it cannot find an interface. That covers no default route, ip timing out, and ip missing. The session then records the interface as unknown.
  • apply_dns() loses its interface parameter, which it never read.
  • The watchdog's is_interface_online() and has_default_route() are removed. Only their own tests called them.
  • ttp start/restart --interface still works. Its help text now says the value is recorded for diagnostics only and that TTP applies to every interface.
  • Updated docs: docs/interfaces.md, the CLI reference and the DNSSEC how-to.

Tests

  • New parametrized test: detect_active_interface() returns None with no default route, when ip times out, and when ip is missing.
  • New test: ttp start without a default route records no interface and prints no eth0.
  • Full suite: 1887 passed locally.

🤖 Generated with Claude Code

onyks-os and others added 2 commits November 30, 2026 18:54
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>
@onyks-os
onyks-os merged commit abb8797 into main Nov 30, 2026
52 of 54 checks passed
@onyks-os
onyks-os deleted the fix/session-interface-label branch November 30, 2026 18:24
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.

The session interface is only a label, and falls back to a nonexistent eth0

1 participant