mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-25 12:57:07 +00:00
Don't route long-header packets based on remote
Fixes use of multiple connections from the same remote.
This commit is contained in:
committed by
Dirkjan Ochtman
parent
a996271090
commit
2f16dc7a96
@@ -229,7 +229,15 @@ impl Endpoint {
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
conn.or_else(|| self.connection_ids_initial.get(&dst_cid))
|
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()
|
.cloned()
|
||||||
};
|
};
|
||||||
if let Some(conn_id) = conn {
|
if let Some(conn_id) = conn {
|
||||||
|
|||||||
Reference in New Issue
Block a user