Skip to content

fix: network ambulance bugs + improved PMTUD and latency diagnostics#12

Merged
hyperpolymath merged 6 commits into
mainfrom
security/hardening
Mar 14, 2026
Merged

fix: network ambulance bugs + improved PMTUD and latency diagnostics#12
hyperpolymath merged 6 commits into
mainfrom
security/hardening

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

  • Fix 4 bugs that prevented the network ambulance from running to completion (SCRIPT_DIR clobbering, set -e crashes on expected non-zero returns, nounset error on associative array, pipefail crash on grep with no match)
  • Replace fixed-size MTU probing with proper PMTUD binary search that finds the exact path MTU and recommends specific fix commands
  • Improve latency test with single-pass measurement, jitter/mdev reporting, packet loss tracking, and 5-tier quality classification aligned with PanLL Aerie panel

Test plan

  • bash src/main.sh diagnose runs to completion on live network
  • MTU test correctly discovers path MTU via binary search
  • Latency test reports RTT, jitter, packet loss, and quality
  • All diagnostic and repair modules handle non-zero returns without crashing
  • --help and --dry-run modes work

🤖 Generated with Claude Code

hyperpolymath and others added 6 commits March 3, 2026 21:58
…ions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- LICENSE: pure MPL-2.0 text for machine detection (GitHub, registries)
- LICENSES/MPL-2.0.txt: standard MPL-2.0 text
- LICENSES/PMPL-1.0-or-later.txt: Palimpsest License text
- NOTICE: explains the dual-license relationship
- Source SPDX headers remain PMPL-1.0-or-later

This ensures OSI compliance checks pass while preserving PMPL as
the governing license for source code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Four bugs prevented the network ambulance from running to completion:
- SCRIPT_DIR in main.sh was overwritten by sourced scripts (renamed to MAIN_DIR)
- set -e killed the script on expected non-zero returns from diagnostic functions
  (changed to `func || total_issues=$((total_issues + $?))` across all modules)
- set -u crashed on uninitialized associative array key in duplicate IP check
- set -eo pipefail crashed when grep found no IP on a down interface

Also improved:
- MTU test: binary search PMTUD with specific fix commands (temporary + permanent)
- Latency test: single-pass with jitter, packet loss, and 5-tier quality classification
- Added Quad9 as third DNS latency target
- MTU mismatch now counts as a diagnostic issue

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit fb2b5bb into main Mar 14, 2026
13 of 17 checks passed
@hyperpolymath hyperpolymath deleted the security/hardening branch March 14, 2026 03:06
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.

1 participant