Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

offsetguess: fix rare failures on offset guessing #27

Merged

Conversation

iaguis
Copy link
Contributor

@iaguis iaguis commented Mar 8, 2017

offsetguess: add a longer timeout for tcp6 Dial

In rare cases Go didn't have enough time to actually do a connection
and the 1 ms timeout was triggered leaving the guess offset state
machine in an invalid state.

Give a bit more time to do the connection.

offsetguess: do not generate invalid IPv6 addresses

Some IPv6 addresses (multicast and link-local) don't result in struct
sock having the address in the correct field, defeating the purpose of
the guessing offsets code.

Don't generate multicast or link-local addresses.

iaguis added 2 commits March 8, 2017 12:26
In rare cases Go didn't have enough time to actually do a connection
and the 1 ms timeout was triggered leaving the guess offset state
machine in an invalid state.

Give a bit more time to do the connection.
Some IPv6 addresses (multicast and link-local) don't result in struct
sock having the address in the correct field, defeating the purpose of
the guessing offsets code.

Don't generate multicast or link-local addresses.
@iaguis
Copy link
Contributor Author

iaguis commented Mar 8, 2017

After 5000 runs of the guessing offset code I got no errors.

Before this PR, I got around 10-15 errors every 1000 runs.

@2opremio 2opremio merged commit 9065e46 into weaveworks:master Mar 8, 2017
sunhay pushed a commit to DataDog/tcptracer-bpf that referenced this pull request Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants