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

Initialize ICMP echo ID and sequence to random values #412

Merged
merged 1 commit into from
Jan 30, 2019

Conversation

BenoitKnecht
Copy link
Contributor

This should help preventing issues with some network devices that have
trouble NATing ICMP packets with the same ID and sequence nubmer but a
different source IP address.

Currently, this can happen if the blackbox_exporter runs in a container
(the ID is set to the PID, which is typically 1 in a container), and
serveral blackbox_exporters are restarted at the same time (the sequence
numbers are reset to zero and stay in sync).

This commit sets the ICMP echo ID to a random value if the PID is 1, and
initializes the sequence number at a random offset.

See #411 for details.

This should help preventing issues with some network devices that have
trouble NATing ICMP packets with the same ID and sequence nubmer but a
different source IP address.

Currently, this can happen if the blackbox_exporter runs in a container
(the ID is set to the PID, which is typically 1 in a container), and
serveral blackbox_exporters are restarted at the same time (the sequence
numbers are reset to zero and stay in sync).

This commit sets the ICMP echo ID to a random value if the PID is 1, and
initializes the sequence number at a random offset.

See prometheus#411 for details.

Signed-off-by: Benoît Knecht <benoit.knecht@fsfe.org>
@brian-brazil brian-brazil merged commit 6958e6f into prometheus:master Jan 30, 2019
@brian-brazil
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants