More errors to Module-Failure-Message
authorAlan T. DeKok <aland@freeradius.org>
Mon, 9 Aug 2010 09:33:36 +0000 (11:33 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 9 Aug 2010 12:06:29 +0000 (14:06 +0200)
src/modules/rlm_eap/libeap/cb.c

index cdac49f..08b928e 100644 (file)
@@ -58,7 +58,17 @@ void cbtls_info(const SSL *s, int where, int ret)
                        SSL_alert_desc_string_long(ret));
        } else if (where & SSL_CB_EXIT) {
                if (ret == 0) {
-                       radlog(L_ERR, "%s:failed in %s\n", str, state);
+                       radlog(L_ERR, "%s:failed in %s", str, state);
+
+                       if (request) {
+                               char buffer[128];
+
+                               snprintf(buffer, sizeof(buffer), "%s:failed in %s");
+
+                               radius_pairmake(request, &request->packet->vps,
+                                               "Module-Failure-Message", buffer, T_OP_ADD);
+                       }
+
                } else if (ret < 0) {
                        if (SSL_want_read(s)) {
                                RDEBUG2("%s: Need to read more data: %s",