Page MenuHomeFreeBSD

ping: Simplify protocol selection.
ClosedPublic

Authored by des on Oct 9 2023, 4:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 21, 5:29 AM
Unknown Object (File)
Tue, May 21, 5:27 AM
Unknown Object (File)
Mon, May 13, 7:37 AM
Unknown Object (File)
Mon, May 13, 7:37 AM
Unknown Object (File)
Thu, May 9, 5:55 AM
Unknown Object (File)
Apr 14 2024, 10:03 PM
Unknown Object (File)
Apr 14 2024, 9:55 PM
Unknown Object (File)
Mar 3 2024, 10:56 PM
Subscribers

Details

Summary
  • Interrupt the option loop as soon as we have an indication of which protocol is intended.
  • If we end up having to perform a DNS lookup, loop over the entire result looking for either IPv4 or IPv6 addresses.

Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Oct 9 2023, 4:52 PM
This revision is now accepted and ready to land.Oct 9 2023, 5:27 PM
This revision now requires review to proceed.Oct 9 2023, 8:01 PM
allanjude added a subscriber: allanjude.

reviewed-by: allanjude

This revision is now accepted and ready to land.Oct 9 2023, 8:58 PM
sbin/ping/main.c
145–146

I can't make up my mind about this... if getaddrinfo() didn't return anything useful, that's not likely to change. Should I put the errx(1, "Unknown host") back? (above the #endif though)

This revision now requires review to proceed.Oct 10 2023, 2:30 PM
This revision is now accepted and ready to land.Oct 10 2023, 8:12 PM
This revision was automatically updated to reflect the committed changes.