Don't route long-header packets based on remote

Fixes use of multiple connections from the same remote.
This commit is contained in:
Benjamin Saunders
2019-01-08 17:26:18 -08:00
committed by Dirkjan Ochtman
parent a996271090
commit 2f16dc7a96
+9 -1
View File
@@ -229,7 +229,15 @@ impl Endpoint {
None
};
conn.or_else(|| self.connection_ids_initial.get(&dst_cid))
.or_else(|| self.connection_remotes.get(&remote))
.or_else(|| {
// If CIDs are in use, only stateless resets (which use short headers) will
// legitimately have unknown CIDs.
if self.config.local_cid_len == 0 || !partial_decode.has_long_header() {
self.connection_remotes.get(&remote)
} else {
None
}
})
.cloned()
};
if let Some(conn_id) = conn {