Page MenuHomeFreeBSD

Fix casper limitations

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



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
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.

137 ↗(On Diff #47448)


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.