#839 duplicates in SRV results are not filtered out correctly
Closed: Fixed None Opened 13 years ago by jhrozek.

The SRV records result processing code tries to filter out duplicate entries, but fails to do so properly. The biggest bug is that the would filter an entry as duplicate even if just the port numbers match:

if (server->port == reply->port) {
    ret = EEXIST;
    break;
}

This might create false-positive DEBUG messages for cases where SRV query expands to the same entries that are hardcoded in the config file as fallback hostnames.

Instead of fixing the duplicate detection, I'd like to suggest we remove it altogether. The hardcoded server hostnames are only meant to be fallback for cases where SRV records fail (a roaming laptop)

Consider this example: a config file contains "ldap_uri=_srv_, foo.example.com". SRV query expands to "foo.example.com bar.example.com". With our code, foo.example.com would be filtered out as a duplicate and the resulting server list would contain "bar.example.com" as the first entry, which is wrong.

The downside would be longer timeout as one server might be contacted multiple times.


Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.5.5
priority: major => blocker

Fields changed

owner: somebody => jhrozek
status: new => assigned

Fixed by:

Master:
- fc5fc2c
- 771127e

sssd-1-5:
- 47fed25

patch: => 0
resolution: => fixed
status: assigned => closed

Fields changed

rhbz: => 0

Metadata Update from @jhrozek:
- Issue assigned to jhrozek
- Issue set to the milestone: SSSD 1.5.5

7 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/1881

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