Skip to content

ldap: add socket timeout

Sumit Bose requested to merge sbose/realmd:socket_timeout into master

During the discovery phase realmd tries to open LDAP connections to multiple DC addresses returned by DNS. When cleaning up we have to call ldap_destroy() to release the resources allocated for the LDAP context. ldap_destroy() tries to send a LDAP unbind request independent of the connection state. If the related address is block by a firewall or a not properly routed IPv6 address there might be no reply on the TCP level and the request might be stuck for quite some tome in the kernel.

To avoid the unexpected long delays will block realmd this patch lowers the timeout considerably to 5s. As multiple other timeouts this value is currently hardcoded.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1817869

Merge request reports