diff --git a/quinn-proto/src/connection/mod.rs b/quinn-proto/src/connection/mod.rs index 3a953a9ed..8b030b06b 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -1638,6 +1638,7 @@ impl Connection { // permit NAT-rebinding-like migration. if let Some(known_remote) = self.path(path_id).map(|path| path.remote) { if remote != known_remote && !self.side.remote_may_migrate() { + dbg!(self.side.side(), self.side.remote_may_migrate()); trace!("discarding packet from unrecognized peer {}", remote); return; } @@ -3094,8 +3095,8 @@ impl Connection { return; } if remote != self.path_data(path_id).remote { - debug!("discarding packet with unexpected remote during handshake"); - return; + debug!("updating packet remote during handshake"); + self.path_data_mut(path_id).remote = remote; } } @@ -5307,7 +5308,7 @@ impl ConnectionSide { fn remote_may_migrate(&self) -> bool { match self { Self::Server { server_config } => server_config.migration, - Self::Client { .. } => false, + Self::Client { .. } => true, // false, } }