Skip to content

[WIP]: allow server migrations #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: multipath-quinn-0.11.x
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions quinn-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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,
}
}

Expand Down
Loading