From 43bb95d7fa0718b3c249db36730492507e3ca36d Mon Sep 17 00:00:00 2001 From: Felician Nemeth Date: Tue, 2 Apr 2024 11:22:08 +0200 Subject: [PATCH] Break linkability on client-side after planned migration (See bug #1803 for the server-side case.) --- quinn/src/connection.rs | 4 ++-- quinn/src/endpoint.rs | 2 +- quinn/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/quinn/src/connection.rs b/quinn/src/connection.rs index 5bed610cb..d3d620da8 100644 --- a/quinn/src/connection.rs +++ b/quinn/src/connection.rs @@ -915,8 +915,8 @@ impl State { ) -> Result<(), ConnectionError> { loop { match self.conn_events.poll_recv(cx) { - Poll::Ready(Some(ConnectionEvent::Ping)) => { - self.inner.ping(); + Poll::Ready(Some(ConnectionEvent::LocalAddressChanged)) => { + self.inner.local_address_changed(); } Poll::Ready(Some(ConnectionEvent::Proto(event))) => { self.inner.handle_event(event); diff --git a/quinn/src/endpoint.rs b/quinn/src/endpoint.rs index 6d359b6c8..773116c7c 100644 --- a/quinn/src/endpoint.rs +++ b/quinn/src/endpoint.rs @@ -221,7 +221,7 @@ impl Endpoint { // Generate some activity so peers notice the rebind for sender in inner.connections.senders.values() { // Ignoring errors from dropped connections - let _ = sender.send(ConnectionEvent::Ping); + let _ = sender.send(ConnectionEvent::LocalAddressChanged); } Ok(()) diff --git a/quinn/src/lib.rs b/quinn/src/lib.rs index cb34a7562..e32465631 100644 --- a/quinn/src/lib.rs +++ b/quinn/src/lib.rs @@ -96,8 +96,8 @@ enum ConnectionEvent { error_code: VarInt, reason: bytes::Bytes, }, + LocalAddressChanged, Proto(proto::ConnectionEvent), - Ping, } #[derive(Debug)]