On 09/03/2013 12:57 PM, Sumit Bose wrote:
Hi,

this issue was discovered by a user and as far as I can see it was
always there. Feel free to apply it to older branches as well.

bye,
Sumit

Hi,
    /* If the resolver is set to honor both address families
     * and the first one matched, retry the second one to
     * get the complete list.
     */

I haven't tried it, but since you don't change the global family, wouldn't this always (if not found) hit the condition and invoke new lookup?

    /* If the resolver is set to honor both address families
     * and the first one matched, retry the second one to
     * get the complete list.
     */
    if (((state->be_res->family_order == IPV4_FIRST &&
          rhostent->family == AF_INET) ||
        (state->be_res->family_order == IPV6_FIRST &&
         rhostent->family == AF_INET6))) {

        retry_family_order = (state->be_res->family_order == IPV4_FIRST) ? \
                             IPV6_ONLY : \
                             IPV4_ONLY;

        subreq = resolv_gethostbyname_send(state, state->ev,
                                           state->be_res->resolv,
                                           state->hostname,
                                           retry_family_order,
                                           state->db);
        if (!subreq) {
            ret = ENOMEM;
            goto done;
        }
        tevent_req_set_callback(subreq, nsupdate_get_addrs_done, req);
        return;
    }



_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to