Page MenuHomeFreeBSD

Use getaddrinfo and getaddrinfo instead of gethostbyname2 in ping(8).
Needs RevisionPublic

Authored by oshogbo on Aug 30 2018, 8:42 PM.
Tags
None
Referenced Files
F81578756: D16957.diff
Thu, Apr 18, 10:10 AM
Unknown Object (File)
Tue, Apr 16, 6:55 AM
Unknown Object (File)
Dec 20 2023, 3:01 AM
Unknown Object (File)
Nov 13 2023, 8:13 AM
Unknown Object (File)
Nov 11 2023, 8:11 AM
Unknown Object (File)
Nov 10 2023, 4:17 PM
Unknown Object (File)
Oct 9 2023, 3:15 PM
Unknown Object (File)
Oct 9 2023, 7:10 AM
Subscribers
None

Details

Reviewers
hrs

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hrs requested changes to this revision.Sep 23 2018, 1:53 PM
hrs added inline comments.
sbin/ping/ping.c
231

sock_in is a confusing name for struct addrinfo. How about just "ai" or "src_ai"?

948

Just before finish(), sock_in (or "ai" or "src_ai") should be safe to free.

if (source)
        freeaddrinfo(sock_in);
1442

Data structure which is pointed by whereto should be freed here.

freeaddrinfo(whereto);
This revision now requires changes to proceed.Sep 23 2018, 1:53 PM