summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-08-07 15:32:05 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-08-09 20:13:26 +0200
commit47d52632d2aaf93e685a6b7c9e3e43972998cf83 (patch)
treed2fb9d467da6ec17874f0894e5a6f3f55ca691ca
parent4a1e58d85409fbb7a12ac244c3dbef8c0c1b15df (diff)
downloadsssd-47d52632d2aaf93e685a6b7c9e3e43972998cf83.tar.gz
sssd-47d52632d2aaf93e685a6b7c9e3e43972998cf83.tar.xz
sssd-47d52632d2aaf93e685a6b7c9e3e43972998cf83.zip
Don't use server after SRV data collapsed
-rw-r--r--src/providers/fail_over.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index faff32f77..facc99044 100644
--- a/src/providers/fail_over.c
+++ b/src/providers/fail_over.c
@@ -1061,17 +1061,20 @@ resolve_srv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
state->ev = ev;
state->resolv = resolv;
state->fo_ctx = ctx;
- state->meta = server;
+ state->meta = server->srv_data->meta;
status = get_srv_data_status(server->srv_data);
- DEBUG(6, ("The status of SRV lookup is %s\n",
- str_srv_data_status(status)));
+ DEBUG(SSSDBG_FUNC_DATA, ("The status of SRV lookup is %s\n",
+ str_srv_data_status(status)));
switch(status) {
case SRV_EXPIRED: /* Need a refresh */
state->meta = collapse_srv_lookup(server);
- /* FALLTHROUGH */
+ /* FALLTHROUGH.
+ * "server" might be invalid now if the SRV
+ * query collapsed
+ * */
case SRV_NEUTRAL: /* Request SRV lookup */
- if (server->srv_data->dns_domain == NULL) {
+ if (state->meta->srv_data->dns_domain == NULL) {
/* we need to look up our DNS domain first */
subreq = resolve_get_domain_send(state, ev, ctx, resolv);
if (subreq == NULL) {