diff options
| author | tv <tv@krebsco.de> | 2026-11-06 04:35:12 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-06 04:35:12 +0100 |
| commit | 9d6d7913ce8bf76717f75d7d4845a61f4889da80 (patch) | |
| tree | 463bf53102c66f002b760002e86c7ef94ce2caa5 /src/transport/tor.rs | |
| parent | ceeec6f661e13a2d9fc7d28f88450f6d45af5c43 (diff) | |
other wire versions warned
Diffstat (limited to 'src/transport/tor.rs')
| -rw-r--r-- | src/transport/tor.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/tor.rs b/src/transport/tor.rs index a08a5d0..c194330 100644 --- a/src/transport/tor.rs +++ b/src/transport/tor.rs @@ -192,6 +192,7 @@ struct Shared { probes: mpsc::Sender<Inbound>, /// Whose messages may be large (`transport::Admission`). admission: std::sync::OnceLock<crate::transport::Admission>, + other_versions: wire::OtherVersions, } fn lock<T>(mutex: &Mutex<T>) -> MutexGuard<'_, T> { @@ -303,6 +304,7 @@ impl TorTransport { inbound, probes, admission: std::sync::OnceLock::new(), + other_versions: wire::OtherVersions::default(), }); let (stopping, stopped) = watch::channel(false); { @@ -566,6 +568,10 @@ impl Shared { } let message = match wire::decode(&body) { Ok(message) => message, + Err(wire::WireError::Version(version)) => { + self.other_versions.note(SCHEME, location, version); + continue; + } Err(error) => { debug!(peer = %Addressed(SCHEME, &location), error = %error, "Dropping a message that doesn't decode"); continue; |
