#2155 [RFE] use netresolve library for network name resolution
Closed: wontfix 4 years ago by pbrezina. Opened 10 years ago by pavlix.

To my knowledge, SSSD currently uses c-ares to perform nonblocking translation of DNS hostnames. So does netresolve and in addition to that it provides a couple of other backends for non-DNS hostnames plus other features like „happy eyeballs“ for DNS as well as for TCP connections. For the complete current and planned feature sets, please see:

https://sourceware.org/git/?p=netresolve.git;a=blob;f=README;hb=HEAD

https://sourceware.org/git/?p=netresolve.git;a=blob;f=TODO;hb=HEAD

Note that netresolve has not yet been released and it lacks some of the features sssd would probably use. I'm filing the ticket to gather the requested features and implement them before netresolve support is integrated into SSSD. Also, I expect netresolve support to be build-time optional for SSSD.


We currently need to resolve A, AAAA and SRV records. That's pretty much it.

Oh and we need both /etc/hosts and DNS as that's what c-ares currently supports.

Replying to [comment:1 jhrozek]:

We currently need to resolve A, AAAA

Supported.

netresolve_resolve(resolver, hostname, NULL, AF_UNSPEC, 0, 0);

count = netresolve_get_path_count(resolver);
for (i = 0; i < count; i++) {
    address = netresolve_get_path(resolver, i, &family, NULL, NULL, NULL);
}

and SRV records. That's pretty much it.

Planned. Something like:

netresolve_set_srv_lookup(resolver, true);
netresolve_resolve(resolver, hostname, service, AF_UNSPEC, 0, IPPROTO_TCP);

count = netresolve_get_path_count(resolver);
for (i = 0; i < count; i++) {
    address = netresolve_get_path(resolver, i, &family, &socktype, &protocol, &port);
}

This is just an example, you would use the callback API with nonblocking behavior.

Replying to [comment:2 jhrozek]:

Oh and we need both /etc/hosts and DNS as that's what c-ares currently supports.

Both are supported, plus NULL, literal addresses, localhost/localhost4/localhost6 (even if they're not in /etc/hosts) and /etc/services (when SRV is not used or not available).

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.13 beta
rhbz: => 0

Fields changed

summary: use netresolve library for network name resolution => [RFE] use netresolve library for network name resolution

SRV record is supported in upstream git, also the API was slightly modified after learning about more of other name resolution APIs. Now the functional blocker is response ordering but for the purpose of first implementations, netresolve ready unless you find some issue yourself.

Fields changed

mark: => 0

Fields changed

milestone: SSSD 1.13 beta => SSSD 1.13 backlog
priority: minor => trivial

Mass-moving tickets not planned for any immediate release and re-setting priority.

milestone: SSSD 1.13 backlog => SSSD Deferred
priority: trivial => major

Metadata Update from @pavlix:
- Issue set to the milestone: SSSD Patches welcome

7 years ago

Thank you for taking time to submit this request for SSSD. Unfortunately this issue was not given priority and the team lacks the capacity to work on it at this time.

Given that we are unable to fulfill this request I am closing the issue as wontfix.

If the issue still persist on recent SSSD you can request re-consideration of this decision by reopening this issue. Please provide additional technical details about its importance to you.

Thank you for understanding.

Metadata Update from @pbrezina:
- Issue close_status updated to: wontfix
- Issue status updated to: Closed (was: Open)

4 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/3197

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata