Skip to content
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

TCP tracing may ignore some incoming ICMP responses #407

Closed
fujiapple852 opened this issue Jan 26, 2023 · 0 comments · Fixed by #408
Closed

TCP tracing may ignore some incoming ICMP responses #407

fujiapple852 opened this issue Jan 26, 2023 · 0 comments · Fixed by #408
Labels
bug Something isn't working tcp
Milestone

Comments

@fujiapple852
Copy link
Owner

fujiapple852 commented Jan 26, 2023

This method will eagerly evaluate both self.recv_tcp_sockets() and self.recv_icmp_probe() and will discard the result of the latter if the former is Some:

    fn recv_probe(&mut self) -> TraceResult<Option<ProbeResponse>> {
        match self.protocol {
            TracerProtocol::Icmp | TracerProtocol::Udp => self.recv_icmp_probe(),
            TracerProtocol::Tcp => Ok(self.recv_tcp_sockets()?.or(self.recv_icmp_probe()?)),
        }
    }

This could, in rare cases for TCP tracing, lead to ICMP response packets being ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tcp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant