From cac0902787b58940a3dd34501c44b0548a2add67 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 f338d996c7..477e7a3034 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 6490cd01ff..02a4ce77e8 100644 --- a/quinn/src/endpoint.rs +++ b/quinn/src/endpoint.rs @@ -219,7 +219,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 238b55e573..3e7c305d17 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)]