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, Oct 29, 2:56 PM
Unknown Object (File)
Sep 30 2024, 6:18 PM
Unknown Object (File)
Sep 27 2024, 11:51 AM
Unknown Object (File)
Sep 27 2024, 8:55 AM
Unknown Object (File)
Sep 18 2024, 10:38 PM
Unknown Object (File)
Sep 11 2024, 3:48 PM
Unknown Object (File)
Sep 5 2024, 11:14 PM
Unknown Object (File)
Sep 4 2024, 7:18 AM
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.