eap-radius: do RADIUS/IKE attribute forwarding in XAuth backend
authorMartin Willi <martin@revosec.ch>
Mon, 22 Jul 2013 13:59:49 +0000 (15:59 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 29 Jul 2013 07:00:49 +0000 (09:00 +0200)
src/libcharon/plugins/eap_radius/eap_radius_forward.c
src/libcharon/plugins/eap_radius/eap_radius_xauth.c

index e912487..3e80e89 100644 (file)
@@ -248,7 +248,8 @@ static void ike2queue(message_t *message, linked_list_t *queue,
        enumerator = message->create_payload_enumerator(message);
        while (enumerator->enumerate(enumerator, &payload))
        {
-               if (payload->get_type(payload) == NOTIFY)
+               if (payload->get_type(payload) == NOTIFY ||
+                       payload->get_type(payload) == NOTIFY_V1)
                {
                        notify = (notify_payload_t*)payload;
                        if (notify->get_notify_type(notify) == RADIUS_ATTRIBUTE)
index caca93f..bd960d2 100644 (file)
@@ -16,6 +16,7 @@
 #include "eap_radius_xauth.h"
 #include "eap_radius_plugin.h"
 #include "eap_radius.h"
+#include "eap_radius_forward.h"
 
 #include <daemon.h>
 #include <radius_client.h>
@@ -76,10 +77,12 @@ static status_t verify_radius(private_eap_radius_xauth_t *this, chunk_t pass)
        request->add(request, RAT_USER_PASSWORD, pass);
 
        eap_radius_build_attributes(request);
+       eap_radius_forward_from_ike(request);
 
        response = this->client->request(this->client, request);
        if (response)
        {
+               eap_radius_forward_to_ike(response);
                switch (response->get_code(response))
                {
                        case RMC_ACCESS_ACCEPT: