[SSSD] [PATCH] dyndns: do not modify global family_order

Pavel Březina pbrezina at redhat.com
Tue Sep 3 11:22:22 UTC 2013


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;
>     }






More information about the sssd-devel mailing list