From 92a3a26e67129cc909e13f2b1173b1ddd075c10f Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Thu, 24 Sep 2026 13:51:52 +0000 Subject: [PATCH] Move the hosts file module to the crate root HostMap and its reloader serve the node's peer display names, the peer ACL and fipsctl as well as the DNS responder, so the hosts file is a mesh-wide concern rather than part of the host-side IPv6 plane. Move hosts.rs whole to src/hosts.rs as a top-level public module. ipv6tun re-exports it, so crate::upper::hosts and fips::upper::hosts still resolve and no consumer changes. The file itself is unchanged. Its tracing target follows the module path and becomes fips::hosts; the changelog note on renamed targets now says so. --- CHANGELOG.md | 4 +++- src/{ipv6tun => }/hosts.rs | 0 src/ipv6tun/mod.rs | 5 ++++- src/lib.rs | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) rename src/{ipv6tun => }/hosts.rs (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06bbcea3..774f3f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -331,7 +331,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Tracing targets of the TUN adapter, DNS responder and ICMPv6 code move from `fips::upper::*` to `fips::ipv6tun::*`, because the module they log from is now `ipv6tun` (for example `fips::upper::tun` becomes `fips::ipv6tun::tun`). - An existing `RUST_LOG` filter naming an old target still parses and simply + The hosts-file loader and reloader log as `fips::hosts` rather than + `fips::upper::hosts`, since the hosts file is now a top-level module. An + existing `RUST_LOG` filter naming an old target still parses and simply stops matching, so the symptom is missing log lines rather than an error. Update `RUST_LOG` filters, journal-watch recipes and any log-scraping alert accordingly. The library path `fips::upper` still resolves. diff --git a/src/ipv6tun/hosts.rs b/src/hosts.rs similarity index 100% rename from src/ipv6tun/hosts.rs rename to src/hosts.rs diff --git a/src/ipv6tun/mod.rs b/src/ipv6tun/mod.rs index 99488a66..4c75dc00 100644 --- a/src/ipv6tun/mod.rs +++ b/src/ipv6tun/mod.rs @@ -7,9 +7,12 @@ pub mod config; pub mod dns; -pub mod hosts; pub mod icmp; pub mod icmp_rate_limit; pub mod ipv6_shim; pub mod tcp_mss; pub mod tun; + +// The hosts file moved to `crate::hosts`; re-exported so `crate::upper::hosts` +// and `fips::upper::hosts` still resolve. +pub use crate::hosts; diff --git a/src/lib.rs b/src/lib.rs index 4a4707f0..9e87865e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,7 @@ pub mod config; pub mod control; #[cfg(target_os = "linux")] pub mod gateway; +pub mod hosts; pub mod identity; // Declared before `node` (and named to sort there) because it carries // `#[macro_use]`: the tick instrumentation macro must be in scope for the