]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFCr340141:
authorMariusz Zaborski <oshogbo@FreeBSD.org>
Tue, 10 Sep 2019 20:41:42 +0000 (20:41 +0000)
committerMariusz Zaborski <oshogbo@FreeBSD.org>
Tue, 10 Sep 2019 20:41:42 +0000 (20:41 +0000)
commiteb484ee90ce2b96d404492d3c713b47f5147162c
tree80eaf9f03b82b753b3e962fc5c20c75d9446b28b
parentf3e0416892450a345ac99760d68a0576ff2e3108
MFCr340141:
  libcasper: fix limitations in dns service

  The getaddrinfo(3) and gethostbyname(3) are used to return the address for a
  given hostname. The getnameinfo(3) and gethostbyaddr(3) are used to return
  hostname for a given address. Right now in casper, we have two limitations:
  - NAME which allows resolving DNS names.
  - ADDR which allows to do revert DNS lookups.

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

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

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

  Reviewed by:  pjd, bcr
  Discussed with:       hrs
  Differential Revision:        https://reviews.freebsd.org/D16930
lib/libcasper/services/cap_dns/cap_dns.3
lib/libcasper/services/cap_dns/cap_dns.c
lib/libcasper/services/cap_dns/tests/dns_test.c