Page MenuHomeFreeBSD

ping: Simplify protocol selection.
ClosedPublic

Authored by des on Oct 9 2023, 4:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 25, 6:36 PM
Unknown Object (File)
Sat, Dec 28, 4:57 PM
Unknown Object (File)
Sat, Dec 28, 4:57 PM
Unknown Object (File)
Dec 14 2024, 6:42 AM
Unknown Object (File)
Dec 2 2024, 4:38 AM
Unknown Object (File)
Nov 28 2024, 1:37 PM
Unknown Object (File)
Nov 23 2024, 2:24 PM
Unknown Object (File)
Nov 20 2024, 10:31 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.