Skip to content

Commit

Permalink
Remove unused arg from received_on
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Oct 18, 2024
1 parent 63a1e22 commit e536595
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions neqo-transport/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Paths {
self.paths
.iter()
.find_map(|p| {
if p.borrow().received_on(local, remote, false) {
if p.borrow().received_on(local, remote) {
Some(Rc::clone(p))
} else {
None
Expand Down Expand Up @@ -580,12 +580,8 @@ impl Path {
}

/// Determine if this path was the one that the provided datagram was received on.
/// This uses the full local socket address, but ignores the port number on the peer
/// if `flexible` is true, allowing for NAT rebinding that retains the same IP.
fn received_on(&self, local: SocketAddr, remote: SocketAddr, flexible: bool) -> bool {
self.local == local
&& self.remote.ip() == remote.ip()
&& (flexible || self.remote.port() == remote.port())
fn received_on(&self, local: SocketAddr, remote: SocketAddr) -> bool {
self.local == local && self.remote == remote
}

/// Update the remote port number. Any flexibility we allow in `received_on`
Expand Down

0 comments on commit e536595

Please sign in to comment.