]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add Module-Failure-Message on failure. Addresses #2464
authorAlan T. DeKok <aland@freeradius.org>
Tue, 5 Feb 2019 13:35:13 +0000 (08:35 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 5 Feb 2019 13:35:13 +0000 (08:35 -0500)
src/modules/rlm_realm/trustrouter.c

index e7294d266068f9cab99b5ee6b243c0a61abeb3fc..cd7350ea1bec6f64caa68d2fcaa928698a9b794c 100644 (file)
@@ -625,7 +625,11 @@ REALM *tr_query_realm(REQUEST *request, char const *realm,
        pthread_mutex_unlock(&tidc_mutex);
 
        /* If we weren't able to get a response from the trust router server, goto cleanup (hence return NULL realm) */
-       if (!rv) goto cleanup;
+       if (!rv) {
+               DEBUG2("Could not connect with Trust Router server for realm %s, rv = %d\n", realm, rv);
+               module_failure_msg(request, "Could not connect with Trust Router server for realm %s", realm);
+               goto cleanup;
+       }
 
        /* If we got a response but it is an error one, include a Reply-Message and Error-Cause attributes */
        if (cookie.result != TID_SUCCESS) {