Page MenuHomeFreeBSD

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

Authored by oshogbo on Aug 30 2018, 8:42 PM.

Details

Reviewers
hrs

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

oshogbo created this revision.Aug 30 2018, 8:42 PM
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