diff --git a/neqo-transport/src/connection/mod.rs b/neqo-transport/src/connection/mod.rs index 0184ddce7..b3f3816fa 100644 --- a/neqo-transport/src/connection/mod.rs +++ b/neqo-transport/src/connection/mod.rs @@ -1532,7 +1532,7 @@ impl Connection { /// This takes two times: when the datagram was received, and the current time. fn input(&mut self, d: &Datagram, received: Instant, now: Instant) { // First determine the path. - let path = self.paths.find_path_with_rebinding( + let path = self.paths.find_path( d.destination(), d.source(), self.conn_params.get_cc_algorithm(), diff --git a/neqo-transport/src/path.rs b/neqo-transport/src/path.rs index 71b9fa96d..2200d7735 100644 --- a/neqo-transport/src/path.rs +++ b/neqo-transport/src/path.rs @@ -98,48 +98,6 @@ impl Paths { }) } - /// Find the path, but allow for rebinding. That matches the pair of addresses - /// to paths that match the remote address only based on IP addres, not port. - /// We use this when the other side migrates to skip address validation and - /// creating a new path. - pub fn find_path_with_rebinding( - &self, - local: SocketAddr, - remote: SocketAddr, - cc: CongestionControlAlgorithm, - pacing: bool, - now: Instant, - ) -> PathRef { - self.paths - .iter() - .find_map(|p| { - if p.borrow().received_on(local, remote, false) { - Some(Rc::clone(p)) - } else { - None - } - }) - .or_else(|| { - self.paths.iter().find_map(|p| { - if p.borrow().received_on(local, remote, true) { - Some(Rc::clone(p)) - } else { - None - } - }) - }) - .unwrap_or_else(|| { - Rc::new(RefCell::new(Path::temporary( - local, - remote, - cc, - pacing, - self.qlog.clone(), - now, - ))) - }) - } - /// Get a reference to the primary path, if one exists. pub fn primary(&self) -> Option { self.primary.clone()