fix: Remove dead BsdAsyncIcmpSocket::new; live BSD IPv6 validation (FreeBSD 14.3 + OpenBSD 7.7)#51
Merged
Merged
Conversation
Live-validated ftr v0.9.0 IPv6 support on real BSD hardware (two arm64 Parallels VMs bridged onto Sonic fiber): FreeBSD 14.3-RELEASE and OpenBSD 7.7. Headline: the OpenBSD `cfg(target_os = "openbsd")` arm of bsd_v6.rs compiled for the first time ever, and clean. The v0.9.0 release build succeeds on both FreeBSD and OpenBSD, and the non-root permission path (typed InsufficientPermissions instead of a raw-socket attempt) is validated live on FreeBSD. The OpenBSD release build surfaced one dead-code warning: `BsdAsyncIcmpSocket::new()` in the shared IPv4 path had only one caller, its own #[cfg(test)] test, so any non-test *release* build on a BSD flags it. It went unnoticed because CI's FreeBSD job builds in test profile (where the test uses it) and `clippy -D warnings` runs on Linux/macOS, where bsd.rs is not compiled at all — the same class of platform-gated dead code cleaned up earlier for the macOS and Windows arms. Remove the redundant `new()` and point its test at `new_with_config(...)`, the constructor the factory actually uses. After the patch, `cargo build --release` finishes warning-free on both OpenBSD and FreeBSD. FreeBSD has confirmed external IPv6; OpenBSD's VM does not. The live root-gated multi-hop trace (which would finally observe a router- originated ICMPv6 Time Exceeded on FreeBSD first-hand) was NOT run this session — raw ICMPv6 needs root, root SSH is disabled on the VMs, and no host-sanctioned escalation path was available. It is recorded in docs/IPV6_DESIGN.md for a maintainer to run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
=======================================
Coverage 84.31% 84.31%
=======================================
Files 36 36
Lines 6663 6663
=======================================
Hits 5618 5618
Misses 1045 1045
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
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.
Live-validated ftr v0.9.0 IPv6 support on real BSD hardware: two arm64 Parallels VMs bridged onto the same Sonic fiber LAN as the existing macOS/Linux/Windows validation environments.
What was validated
FreeBSD 14.3-RELEASE (arm64) —
FreeBSD freebsd143 14.3-RELEASE ... GENERIC arm642001:5a8:4681:2c00:21c:42ff:fed9:7283, v6 default route viavtnet0,ping6 google.com0% loss (replies from2607:f8b0:4005:808::200e, hlim=109, ~3.3ms).gitabsent (source shipped as a v0.9.0 tarball);cargo build --release→ exit 0, 1,163,584-byte binary.OpenBSD 7.7 (arm64) — first-ever compile of the
cfg(target_os = "openbsd")arm —OpenBSD openbsd7.localdomain 7.7 GENERIC.MP#2 arm64::1, no global v6, no v6 default route;ping6 google.com100% loss (ret=-1). OpenBSD v6 traces on this host are limited to loopback.bsd_v6.rsarm compiled for the first time ever, and clean.git clone --branch v0.9.0+cargo build --release→ exit 0 in 2m20s, 1,251,000-byte binary. It emitted exactly one warning — dead code in the shared IPv4 path (see below).The dead-code fix
The OpenBSD (and any BSD) release build flagged:
BsdAsyncIcmpSocket::new()had a single caller — its own#[cfg(test)]unit test — so a non-test release build on a BSD flags it. It went unnoticed because CI's FreeBSD job builds in test profile (where the test uses it) andclippy -D warningsruns on Linux/macOS, wherebsd.rsis not compiled at all. This is the same class of platform-gated dead code cleaned up earlier for the macOS and Windows arms. The fix removes the redundantnew()and points its test atnew_with_config(TimingConfig::default())— the constructor the socket factory actually uses. After the patch,cargo build --releasefinishes warning-free on both OpenBSD (33.85s) and FreeBSD (7.50s), confirmed by rebuild on the live VMs.What remains untested (honest)
The live root-gated multi-hop trace was not run this session. Raw ICMPv6 requires root on the BSDs; direct root SSH is disabled on both VMs and no host-sanctioned privilege-escalation path was available, so the run that would finally observe a router-originated ICMPv6 Time Exceeded on FreeBSD first-hand is deferred to a maintainer (recorded in
docs/IPV6_DESIGN.md). FreeBSD has confirmed external v6, so the trace is achievable there; OpenBSD's VM has no external v6. Rootcargo teston the VMs likewise pending.Validation
cargo fmt,cargo clippy --all-targets -D warnings,cargo test(228+20+doctests pass),RUSTDOCFLAGS=-D warnings cargo doc— all green. (cargo check --target x86_64-unknown-freebsdfails onopenssl-sysheader cross-compile, unrelated to this change;bsd.rsisn't reached.)bsd.rs.🤖 Generated with Claude Code