Page MenuHomeFreeBSD

ping: Simplify protocol selection.
ClosedPublic

Authored by des on Oct 9 2023, 4:52 PM.
Tags
None
Referenced Files
F131780923: D42137.id128528.diff
Sat, Oct 11, 2:55 AM
Unknown Object (File)
Fri, Oct 10, 8:16 PM
Unknown Object (File)
Fri, Oct 10, 8:13 PM
Unknown Object (File)
Fri, Oct 10, 8:09 PM
Unknown Object (File)
Fri, Oct 10, 8:09 PM
Unknown Object (File)
Fri, Oct 10, 8:08 PM
Unknown Object (File)
Fri, Oct 10, 2:43 PM
Unknown Object (File)
Tue, Sep 23, 8:53 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.