Page MenuHomeFreeBSD

ping: Simplify protocol selection.
ClosedPublic

Authored by des on Oct 9 2023, 4:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 3, 6:25 AM
Unknown Object (File)
Sat, Aug 2, 7:09 PM
Unknown Object (File)
Tue, Jul 29, 5:29 AM
Unknown Object (File)
Jul 8 2025, 6:40 AM
Unknown Object (File)
Jul 7 2025, 12:05 AM
Unknown Object (File)
Jul 6 2025, 7:14 AM
Unknown Object (File)
Jul 6 2025, 1:09 AM
Unknown Object (File)
Jul 4 2025, 5:42 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 53912
Build 50802: arc lint + arc unit

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.