summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-12-14 11:07:24 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-12-14 15:35:28 -0500
commit3241a0b89ea769c9d01b316136880cf2a8d3407f (patch)
tree28511738daab6e2d3b718b1a025187eb3954701f /src
parentaa5e1008d46f63c5317c890bc9a849e02939cf23 (diff)
downloadsssd-3241a0b89ea769c9d01b316136880cf2a8d3407f.tar.gz
sssd-3241a0b89ea769c9d01b316136880cf2a8d3407f.tar.bz2
sssd-3241a0b89ea769c9d01b316136880cf2a8d3407f.zip
Reschedule the fd timeout for secondary lookups
We were unscheduling the timeout handler after the first lookup (A or AAAA) returned, but not rescheduling it if we went on to check the secondary record type. This resulted in the resolver never returning a result for the secondary lookup, which can mean that logins/screen unlocks after VPN drop or suspend/resume might never complete. Fixes https://fedorahosted.org/sssd/ticket/729
Diffstat (limited to 'src')
-rw-r--r--src/resolv/async_resolv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c
index 8aa0e0d1..b7e03ded 100644
--- a/src/resolv/async_resolv.c
+++ b/src/resolv/async_resolv.c
@@ -571,6 +571,8 @@ resolv_gethostbyname_done(void *arg, int status, int timeouts, struct hostent *h
DEBUG(4, ("Trying to resolve %s record of '%s'\n",
state->family == AF_INET ? "A" : "AAAA",
state->name));
+ schedule_timeout_watcher(state->resolv_ctx->ev_ctx,
+ state->resolv_ctx);
ares_gethostbyname(state->resolv_ctx->channel, state->name,
state->family, resolv_gethostbyname_next_done,
req);
@@ -600,6 +602,8 @@ resolv_gethostbyname_next_done(void *arg, int status, int timeouts, struct hoste
return;
}
+ unschedule_timeout_watcher(state->resolv_ctx);
+
if (hostent != NULL) {
state->hostent = resolv_copy_hostent(req, hostent);
if (state->hostent == NULL) {