-
-
Notifications
You must be signed in to change notification settings - Fork 483
Black hole detection fixes #2400
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
Conversation
Lost packets with size exactly matching the minimum MTU should not be treated as suspicious; by definition the MTU will never be reduced below this. Similarly, lost packets with size exactly matching a more recent successfully transmitted packet should not be treated as suspicious.
There is a test which picks up this issue here, but it's not really suitable for including in the test suite. It iterates over many patterns of handshake packet loss and so takes quite a while to run. Even with this bug fix the test doesn't actually pass because the static |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Can you squash the test commit into the commit that broke it, and the formatting fix into the commit that originated the formatting deviation?
While we will never start probing before the connection has been established, it is possible for black hole detection to trigger, which will put MTU discovery into the Complete state.
99d47c0
to
3e4cbb0
Compare
Sure, done. |
@Ralith would be nice if you could take a look at this. @zdave-parity |
I think we'd be happy to just upgrade to 0.12 when it is released. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes make perfect sense to me. Thanks for finding these!
I'm not sure we should exclude such tests -- exhaustive searches and fuzzing are important, as this PR illustrates! Might want a separate test binary that gets built in release mode, or something, though... |
Relax an MTU discovery state assertion: while we will never start probing before the connection has been established, it is possible for black hole detection to trigger, which will put MTU discovery into the
Phase::Complete
state.Fix some comparisons in the black hole detector: