Page MenuHomeFreeBSD

Fix casper limitations
ClosedPublic

Authored by oshogbo on Aug 28 2018, 10:04 PM.

Details

Summary

The getaddrinfo and gethostbyname are used to return
address for a given hostname. The getnameinfo and gethostbyaddr are used to
return hostnem for a given address. Right now in Casper we have two
limitations: NAME which allows to resolve DNS names. ADDR which allows to do
revert DNS lookups.

Before this change the rights was mixed up:
NAME - getnameinfo and gethostbyname
ADDR - gethostbyaddr and getaddrinfo

Which no matters on limitation allowed us to resolve DNS names and do DNS lookups
basically by using different set of functions.

Now the NAME type allows getaddrinfo and gethostbyname functions, and the ADDR names
allows to use gethostbyaddr and getnameinfo functions.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

oshogbo created this revision.Aug 28 2018, 10:04 PM
oshogbo updated this revision to Diff 47448.Aug 29 2018, 4:58 PM

Update tests.

oshogbo added a reviewer: pjd.Aug 29 2018, 4:59 PM
bcr added a comment.Sep 26 2018, 5:26 PM

Two fixes for the man page.

lib/libcasper/services/cap_dns/cap_dns.3
137 ↗(On Diff #47448)

s/revert/reverse/
s/is/are/

pjd accepted this revision.Oct 20 2018, 11:08 PM

Change looks good, my only suggestion would be to use maybe NAME2ADDR and ADDR2NAME, so the intentions are obvious.

This revision is now accepted and ready to land.Oct 20 2018, 11:08 PM
This revision was automatically updated to reflect the committed changes.