diff options
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; |
