Page MenuHomeFreeBSD

ping: do reverse DNS lookup for a reply by default
ClosedPublic

Authored by sucanjan_gmail.com on Aug 21 2019, 1:57 PM.

Details

Summary

Do reverse DNS lookup for a reply by default

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google LLC (Google Summer of Code 2019)

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 25992
Build 24546: arc lint + arc unit

Event Timeline

asomers accepted this revision.Aug 21 2019, 2:51 PM
This revision is now accepted and ready to land.Aug 21 2019, 2:51 PM
This revision was automatically updated to reflect the committed changes.
cem added a subscriber: cem.Aug 22 2019, 12:17 AM

Hm, I'm not sure I like this being the new default. I guess Linux does it, but there are or used to be many networks where reverse DNS was totally broken (as in, silently dropped). It is nice that ping is mostly a test of IP (ICMP) and not the higher level UDP/TCP protocols DNS uses.

Is there a very short timeout on rDNS lookup failure or on broken networks will ping just hang for 30 seconds at a time?

In D21351#464706, @cem wrote:

Hm, I'm not sure I like this being the new default. I guess Linux does it, but there are or used to be many networks where reverse DNS was totally broken (as in, silently dropped). It is nice that ping is mostly a test of IP (ICMP) and not the higher level UDP/TCP protocols DNS uses.
Is there a very short timeout on rDNS lookup failure or on broken networks will ping just hang for 30 seconds at a time?

Personally, I could go either way for the default. What's most important IMHO is that ping and ping6 have the same default. Until now, they didn't.

cem added a comment.Aug 22 2019, 12:29 AM

Personally, I could go either way for the default. What's most important IMHO is that ping and ping6 have the same default. Until now, they didn't.

I agree they should have the same default. But I think generally, where such defaults might conflict, the IPv4 version of the tool's default takes precedence. IPv4 is still the dominant protocol, as much as we'd all like that to change. The foo6 utilities are all secondary.

Maybe the title of this revision is not completely exact. The F_NUMERIC option flag has been cleared by default so it's more like ping was intended to do reverse lookups by default.

After reading opinions of both of you, I lean a bit more towards numeric only output being default. It will be done in the next diff.