-
Notifications
You must be signed in to change notification settings - Fork 284
Improve handling of -4/-6 #2115
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
Improve handling of -4/-6 #2115
Conversation
Firstyear
commented
Mar 27, 2025
|
Hi @Firstyear, |
|
No problem, will fix that shortly :) |
|
@RincewindsHat No problems, I have fixed the issue and commented the logic a bit better now. |
|
Sorry for the delay, I did not forget this, but there are too many things to do ... Anyway, I did some reading and at least current versions of Additionaly we had a small discussion in the IRC about whether IPv6 is optional anymore and the result (from my side at least) is, that IPv6 is not optional anymore and we can remove all occurences of This is probably a lot to ask of you, since this changes everything here, but would that be something you would like to adapt? |
|
I actually agree with all these points - I didn't want to overstep and just "remove things" without checking first. So I'm happy to remove both the |
If fping is used with a target that has dual stack v4/v6, then due to the logic during command construction, ipv4 will never be checked as v6 is preferred by fping. This explicitly flags -4/-6 when it is requested by the user.
b05f6d0 to
1fb9300
Compare
|
Looks like this fails on your CI as debian:stable lacks "is_inet6_addr" (see plugins/netutils.h line 83). What did you want me to do here about that one? |
|
IPv6 was disabled statically in the CI. I reenabled it in #2123. Could you update your branch to the current master? |
|
No problem, updated. |
|
Nice, thank you. Would it be better, if we get |
|
The logic goes: So if the user make no assertion about the v4 or v6, then if the address is v6 OR dualstack -> v6, if the user made no assertion and the address is v4 only then we use v4 as a flag. This is to ensure that how we resolve the address matches what fping will do - for example, we resolve the address as v6 and then fping attempts v4 (because we passed a hostname, not an ip). The goal was to make this just a bit more deterministic and clear about what we are actually testing, rather than leaving it as "undefined". |
RincewindsHat
left a comment
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.
I see, maybe I had a knot in my thoughts before.
Anyway, thank you for your work and for adapting to my wishes so quickly :-)
|
No problem at all! Happy to help :) |