]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Autoload eap base attributes
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 11 May 2018 09:27:04 +0000 (15:27 +0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 11 May 2018 09:27:04 +0000 (15:27 +0600)
12 files changed:
src/modules/rlm_eap/lib/base/eap_attrs.h [new file with mode: 0644]
src/modules/rlm_eap/lib/base/eap_base.c
src/modules/rlm_eap/lib/base/eap_base.h
src/modules/rlm_eap/lib/base/eap_chbind.c
src/modules/rlm_eap/lib/base/eap_tls.c
src/modules/rlm_eap/lib/base/mppe_keys.c
src/modules/rlm_eap/types/rlm_eap_aka/rlm_eap_aka.c
src/modules/rlm_eap/types/rlm_eap_fast/eap_fast.h
src/modules/rlm_eap/types/rlm_eap_fast/rlm_eap_fast.c
src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c
src/modules/rlm_eap/types/rlm_eap_pwd/rlm_eap_pwd.c
src/modules/rlm_eap/types/rlm_eap_sim/rlm_eap_sim.c

diff --git a/src/modules/rlm_eap/lib/base/eap_attrs.h b/src/modules/rlm_eap/lib/base/eap_attrs.h
new file mode 100644 (file)
index 0000000..b772d5d
--- /dev/null
@@ -0,0 +1,39 @@
+#pragma once
+/*
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/**
+ * $Id$
+ * @file eap_attrs.h
+ * @brief Interface into the base EAP library
+ *
+ * @copyright 2018 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
+ */
+RCSIDH(eap_attrs_h, "$Id$")
+
+extern fr_dict_attr_t const *attr_chbind_response_code;
+extern fr_dict_attr_t const *attr_eap_session_id;
+extern fr_dict_attr_t const *attr_eap_type;
+extern fr_dict_attr_t const *attr_virtual_server;
+
+extern fr_dict_attr_t const *attr_message_authenticator;
+extern fr_dict_attr_t const *attr_eap_channel_binding_message;
+extern fr_dict_attr_t const *attr_eap_message;
+extern fr_dict_attr_t const *attr_eap_msk;
+extern fr_dict_attr_t const *attr_eap_emsk;
+extern fr_dict_attr_t const *attr_freeradius_proxied_to;
+extern fr_dict_attr_t const *attr_ms_mppe_send_key;
+extern fr_dict_attr_t const *attr_ms_mppe_recv_key;
index 069432cb5b9528b3b658187776d29812ef076b8a..db1dd72017df8f4e926f8cd52ee92cfcdd566228 100644 (file)
@@ -64,27 +64,46 @@ RCSID("$Id$")
 #include <freeradius-devel/libradius.h>
 #include <freeradius-devel/rad_assert.h>
 #include "eap_types.h"
+#include "eap_attrs.h"
 #include "eap.h"
 
+static fr_dict_t const *dict_freeradius;
 static fr_dict_t const *dict_radius;
 
 extern fr_dict_autoload_t eap_base_dict[];
 fr_dict_autoload_t eap_base_dict[] = {
+       { .out = &dict_freeradius, .proto = "freeradius" },
        { .out = &dict_radius, .proto = "radius" },
-
        { NULL }
 };
 
+fr_dict_attr_t const *attr_chbind_response_code;
+fr_dict_attr_t const *attr_eap_session_id;
+fr_dict_attr_t const *attr_eap_type;
+fr_dict_attr_t const *attr_virtual_server;
+
+fr_dict_attr_t const *attr_message_authenticator;
+fr_dict_attr_t const *attr_eap_channel_binding_message;
+fr_dict_attr_t const *attr_eap_message;
 fr_dict_attr_t const *attr_eap_msk;
 fr_dict_attr_t const *attr_eap_emsk;
-
+fr_dict_attr_t const *attr_freeradius_proxied_to;
 fr_dict_attr_t const *attr_ms_mppe_send_key;
 fr_dict_attr_t const *attr_ms_mppe_recv_key;
 
 extern fr_dict_attr_autoload_t eap_base_dict_attr[];
 fr_dict_attr_autoload_t eap_base_dict_attr[] = {
+       { .out = &attr_chbind_response_code, .name = "Chbind-Response-Code", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
+       { .out = &attr_eap_session_id, .name = "EAP-Session-Id", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
+       { .out = &attr_eap_type, .name = "EAP-Type", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
+       { .out = &attr_virtual_server, .name = "Virtual-Server", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
+
+       { .out = &attr_message_authenticator, .name = "Message-Authenticator", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_eap_channel_binding_message, .name = "EAP-Channel-Binding-Message", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_eap_message, .name = "EAP-Message", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { .out = &attr_eap_msk, .name = "EAP-MSK", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { .out = &attr_eap_emsk, .name = "EAP-EMSK", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_freeradius_proxied_to, .name = "FreeRADIUS-Proxied-To", .type = FR_TYPE_IPV4_ADDR, .dict = &dict_radius },
        { .out = &attr_ms_mppe_send_key, .name = "MS-MPPE-Send-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { .out = &attr_ms_mppe_recv_key, .name = "MS-MPPE-Recv-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
 
@@ -104,7 +123,7 @@ eap_type_t eap_name2type(char const *name)
 {
        fr_dict_enum_t  *dv;
 
-       dv = fr_dict_enum_by_alias(fr_dict_attr_by_num(NULL, 0, FR_EAP_TYPE), name);
+       dv = fr_dict_enum_by_alias(attr_eap_type, name);
        if (!dv) return FR_EAP_INVALID;
 
        if (dv->value->vb_uint32 >= FR_EAP_MAX_TYPES) return FR_EAP_INVALID;
@@ -120,7 +139,7 @@ char const *eap_type2name(eap_type_t method)
 {
        fr_dict_enum_t  *dv;
 
-       dv = fr_dict_enum_by_value(fr_dict_attr_by_num(NULL, 0, FR_EAP_TYPE), fr_box_uint32(method));
+       dv = fr_dict_enum_by_value(attr_eap_type, fr_box_uint32(method));
        if (dv) return dv->alias;
 
        return "unknown";
@@ -220,7 +239,7 @@ VALUE_PAIR *eap_packet2vp(RADIUS_PACKET *packet, eap_packet_raw_t const *eap)
                size = total;
                if (size > 253) size = 253;
 
-               vp = fr_pair_afrom_num(packet, 0, FR_EAP_MESSAGE);
+               vp = fr_pair_afrom_da(packet, attr_eap_message);
                if (!vp) {
                        fr_pair_list_free(&head);
                        return NULL;
@@ -256,7 +275,7 @@ eap_packet_raw_t *eap_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps)
        /*
         *      Get only EAP-Message attribute list
         */
-       first = fr_pair_find_by_num(vps, 0, FR_EAP_MESSAGE, TAG_ANY);
+       first = fr_pair_find_by_da(vps, attr_eap_message, TAG_ANY);
        if (!first) {
                fr_strerror_printf("EAP-Message not found");
                return NULL;
@@ -290,7 +309,7 @@ eap_packet_raw_t *eap_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps)
         */
        total_len = 0;
        fr_pair_cursor_init(&cursor, &first);
-       while ((i = fr_pair_cursor_next_by_num(&cursor, 0, FR_EAP_MESSAGE, TAG_ANY))) {
+       while ((i = fr_pair_cursor_next_by_da(&cursor, attr_eap_message, TAG_ANY))) {
                total_len += i->vp_length;
 
                if (total_len > len) {
@@ -322,7 +341,7 @@ eap_packet_raw_t *eap_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps)
 
        /* RADIUS ensures order of attrs, so just concatenate all */
        fr_pair_cursor_first(&cursor);
-       while ((i = fr_pair_cursor_next_by_num(&cursor, 0, FR_EAP_MESSAGE, TAG_ANY))) {
+       while ((i = fr_pair_cursor_next_by_da(&cursor, attr_eap_message, TAG_ANY))) {
                memcpy(ptr, i->vp_strvalue, i->vp_length);
                ptr += i->vp_length;
        }
@@ -367,7 +386,7 @@ rlm_rcode_t eap_virtual_server(REQUEST *request, REQUEST *fake,
        rlm_rcode_t     rcode;
        VALUE_PAIR      *vp;
 
-       vp = fr_pair_find_by_num(request->control, 0, FR_VIRTUAL_SERVER, TAG_ANY);
+       vp = fr_pair_find_by_da(request->control, attr_virtual_server, TAG_ANY);
        fake->server_cs = vp ? virtual_server_find(vp->vp_strvalue) : virtual_server_find(virtual_server);
 
        if (fake->server_cs) {
index 2e628a98f4440a9769962e6f66e75a1cb0320dcd..9356cb8da742c8ff7e4e19530c53a44d03823a24 100644 (file)
@@ -26,12 +26,6 @@ RCSIDH(eap_base_h, "$Id$")
 
 #include "eap_types.h"
 
-extern fr_dict_attr_t const *attr_eap_msk;
-extern fr_dict_attr_t const *attr_eap_emsk;
-
-extern fr_dict_attr_t const *attr_ms_mppe_send_key;
-extern fr_dict_attr_t const *attr_ms_mppe_recv_key;
-
 /*
  * interfaces in eapcommon.c
  */
index 3d05a0ab17d6feba0f7924b71101846c0c6b7dca..5d69b66814fef50e533fd6e2b5a4e52a832a9f6c 100644 (file)
@@ -25,6 +25,7 @@
 RCSID("$Id$")
 
 #include "eap_chbind.h"
+#include "eap_attrs.h"
 
 static bool chbind_build_response(REQUEST *request, CHBIND_REQ *chbind)
 {
@@ -42,7 +43,7 @@ static bool chbind_build_response(REQUEST *request, CHBIND_REQ *chbind)
                 *      Skip things which shouldn't be in channel bindings.
                 */
                if (vp->da->flags.encrypt != FLAG_ENCRYPT_NONE) continue;
-               if (fr_dict_attr_is_top_level(vp->da) && (vp->da->attr == FR_MESSAGE_AUTHENTICATOR)) continue;
+               if (vp->da == attr_message_authenticator) continue;
 
                total += 2 + vp->vp_length;
        }
@@ -62,7 +63,7 @@ static bool chbind_build_response(REQUEST *request, CHBIND_REQ *chbind)
         *      Set the response code.  Default to "fail" if none was
         *      specified.
         */
-       vp = fr_pair_find_by_num(request->control, 0, FR_CHBIND_RESPONSE_CODE, TAG_ANY);
+       vp = fr_pair_find_by_da(request->control, attr_chbind_response_code, TAG_ANY);
        if (vp) {
                ptr[0] = vp->vp_uint32;
        } else {
@@ -93,7 +94,7 @@ static bool chbind_build_response(REQUEST *request, CHBIND_REQ *chbind)
                        fr_cursor_next(&cursor);
                        continue;
                }
-               if (fr_dict_attr_is_top_level(vp->da) && (vp->da->attr == FR_MESSAGE_AUTHENTICATOR)) goto next;
+               if (vp->da == attr_message_authenticator) goto next;
 
                length = fr_radius_encode_pair(ptr, end - ptr, &cursor, NULL);
                ptr += length;
@@ -155,11 +156,12 @@ static size_t chbind_get_data(chbind_packet_t const *packet,
 
 FR_CODE chbind_process(REQUEST *request, CHBIND_REQ *chbind)
 {
-       FR_CODE code;
-       rlm_rcode_t rcode;
-       REQUEST *fake = NULL;
-       uint8_t const *attr_data;
-       size_t data_len = 0;
+       FR_CODE         code;
+       rlm_rcode_t     rcode;
+       REQUEST         *fake = NULL;
+       uint8_t const   *attr_data;
+       size_t          data_len = 0;
+       VALUE_PAIR      *vp;
 
        /* check input parameters */
        rad_assert((request != NULL) &&
@@ -169,7 +171,8 @@ FR_CODE chbind_process(REQUEST *request, CHBIND_REQ *chbind)
 
        /* Set-up the fake request */
        fake = request_alloc_fake(request);
-       fr_pair_make(fake->packet, &fake->packet->vps, "Freeradius-Proxied-To", "127.0.0.1", T_OP_EQ);
+       MEM(vp = fr_pair_add_by_da(fake->packet, &fake->packet->vps, attr_freeradius_proxied_to, 0));
+       fr_pair_value_from_str(vp, "127.0.0.1", sizeof("127.0.0.1"));
 
        /* Add the username to the fake request */
        if (chbind->username) {
@@ -257,16 +260,16 @@ chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps)
        chbind_packet_t         *packet;
        vp_cursor_t             cursor;
 
-       first = fr_pair_find_by_num(vps, VENDORPEC_UKERNA, FR_UKERNA_CHBIND, TAG_ANY);
+       first = fr_pair_find_by_da(vps, attr_eap_channel_binding_message, TAG_ANY);
        if (!first) return NULL;
 
        /*
         *      Compute the total length of the channel binding data.
         */
        length = 0;
-       for (vp =fr_pair_cursor_init(&cursor, &first);
+       for (vp = fr_pair_cursor_init(&cursor, &first);
             vp != NULL;
-            vp = fr_pair_cursor_next_by_num(&cursor, VENDORPEC_UKERNA, FR_UKERNA_CHBIND, TAG_ANY)) {
+            vp = fr_pair_cursor_next_by_da(&cursor, attr_eap_channel_binding_message, TAG_ANY)) {
                length += vp->vp_length;
        }
 
@@ -287,7 +290,7 @@ chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps)
        packet = (chbind_packet_t *) ptr;
        for (vp = fr_pair_cursor_init(&cursor, &first);
             vp != NULL;
-            vp = fr_pair_cursor_next_by_num(&cursor, VENDORPEC_UKERNA, FR_UKERNA_CHBIND, TAG_ANY)) {
+            vp = fr_pair_cursor_next_by_da(&cursor, attr_eap_channel_binding_message, TAG_ANY)) {
                memcpy(ptr, vp->vp_octets, vp->vp_length);
                ptr += vp->vp_length;
        }
@@ -301,7 +304,7 @@ VALUE_PAIR *eap_chbind_packet2vp(RADIUS_PACKET *packet, chbind_packet_t *chbind)
 
        if (!chbind) return NULL; /* don't produce garbage */
 
-       vp = fr_pair_afrom_num(packet, VENDORPEC_UKERNA, FR_UKERNA_CHBIND);
+       vp = fr_pair_afrom_da(packet, attr_eap_channel_binding_message);
        if (!vp) return NULL;
        fr_pair_value_memcpy(vp, (uint8_t *) chbind, talloc_array_length((uint8_t *)chbind));
 
index 7836b0dc89a3cc171dd33bfc04ac458915921136..f929fdb404e46bb21c3feb47ff2cc9f4fa25b69b 100644 (file)
@@ -72,6 +72,7 @@ RCSID("$Id$")
 USES_APPLE_DEPRECATED_API      /* OpenSSL API has been deprecated by Apple */
 
 #include "eap_tls.h"
+#include "eap_attrs.h"
 
 FR_NAME_NUMBER const eap_tls_status_table[] = {
        { "invalid",                    EAP_TLS_INVALID },
index a9ab771e1e640900676a4fcd8946476dbbc442ed..5aa6b955f7ae79cb70e5ca025c7a25711337e1ac 100644 (file)
@@ -33,6 +33,7 @@ USES_APPLE_DEPRECATED_API     /* OpenSSL API has been deprecated by Apple */
 #include <freeradius-devel/sha1.h>
 #include "eap_tls.h"
 #include "eap_base.h"
+#include "eap_attrs.h"
 
 
 #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
@@ -308,7 +309,7 @@ void eap_tls_gen_eap_key(RADIUS_PACKET *packet, SSL *ssl, uint32_t header)
        VALUE_PAIR *vp;
        uint8_t *buff, *p;
 
-       vp = fr_pair_afrom_num(packet, 0, FR_EAP_SESSION_ID);
+       vp = fr_pair_afrom_da(packet, attr_eap_session_id);
        if (!vp) return;
 
        MEM(buff = p = talloc_array(vp, uint8_t, 1 + (2 * SSL3_RANDOM_SIZE)));
index 500a20573b8b62de9359649740a11059bbfcf051..c5b18480902be9c73d3825ce7abf8d885fe04a99 100644 (file)
@@ -58,11 +58,13 @@ static CONF_PARSER submodule_config[] = {
 };
 
 static fr_dict_t const *dict_freeradius;
+static fr_dict_t const *dict_radius;
 static fr_dict_t const *dict_eap_aka;
 
 extern fr_dict_autoload_t rlm_eap_aka_dict[];
 fr_dict_autoload_t rlm_eap_aka_dict[] = {
        { .out = &dict_freeradius, .proto = "freeradius" },
+       { .out = &dict_radius, .proto = "radius" },
        { .out = &dict_eap_aka, .proto = "eap-aka" },
        { NULL }
 };
@@ -71,6 +73,9 @@ static fr_dict_attr_t const *attr_eap_aka_root;
 static fr_dict_attr_t const *attr_eap_aka_subtype;
 static fr_dict_attr_t const *attr_sim_amf;
 
+static fr_dict_attr_t const *attr_ms_mppe_send_key;
+static fr_dict_attr_t const *attr_ms_mppe_recv_key;
+
 static fr_dict_attr_t const *attr_eap_aka_any_id_req;
 static fr_dict_attr_t const *attr_eap_aka_autn;
 static fr_dict_attr_t const *attr_eap_aka_bidding;
@@ -94,6 +99,9 @@ fr_dict_attr_autoload_t rlm_eap_aka_dict_attr[] = {
        { .out = &attr_eap_aka_subtype, .name = "EAP-AKA-Subtype", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
        { .out = &attr_sim_amf, .name = "SIM-AMF", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
 
+       { .out = &attr_ms_mppe_send_key, .name = "MS-MPPE-Send-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_ms_mppe_recv_key, .name = "MS-MPPE-Recv-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+
        { .out = &attr_eap_aka_any_id_req, .name = "EAP-AKA-Any-ID-Req", .type = FR_TYPE_BOOL, .dict = &dict_eap_aka },
        { .out = &attr_eap_aka_autn, .name = "EAP-AKA-AUTN", .type = FR_TYPE_OCTETS, .dict = &dict_eap_aka },
        { .out = &attr_eap_aka_bidding, .name = "EAP-AKA-Bidding", .type = FR_TYPE_UINT16, .dict = &dict_eap_aka },
index e619fe6908966b178e7fc2bdfc064ef570e8e06f..a9597934b87d6eee1ba193de0c7d15d557695b1c 100644 (file)
@@ -211,7 +211,11 @@ extern fr_dict_attr_t const *attr_ms_chap_peer_challenge;
 extern fr_dict_attr_t const *attr_proxy_to_realm;
 
 extern fr_dict_attr_t const *attr_eap_message;
+extern fr_dict_attr_t const *attr_eap_msk;
+extern fr_dict_attr_t const *attr_eap_emsk;
 extern fr_dict_attr_t const *attr_freeradius_proxied_to;
+extern fr_dict_attr_t const *attr_ms_mppe_send_key;
+extern fr_dict_attr_t const *attr_ms_mppe_recv_key;
 extern fr_dict_attr_t const *attr_user_name;
 extern fr_dict_attr_t const *attr_user_password;
 
index 81fb1fd7ff3e781747ad301c7624860d40f74f7b..f0692403c18d899a24958728d2413a26195441fc 100644 (file)
@@ -92,7 +92,11 @@ fr_dict_attr_t const *attr_ms_chap_peer_challenge;
 fr_dict_attr_t const *attr_proxy_to_realm;
 
 fr_dict_attr_t const *attr_eap_message;
+fr_dict_attr_t const *attr_eap_msk;
+fr_dict_attr_t const *attr_eap_emsk;
 fr_dict_attr_t const *attr_freeradius_proxied_to;
+fr_dict_attr_t const *attr_ms_mppe_send_key;
+fr_dict_attr_t const *attr_ms_mppe_recv_key;
 fr_dict_attr_t const *attr_user_name;
 fr_dict_attr_t const *attr_user_password;
 
@@ -133,7 +137,11 @@ fr_dict_attr_autoload_t rlm_eap_fast_dict_attr[] = {
        { .out = &attr_proxy_to_realm, .name = "Proxy-To-Realm", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
 
        { .out = &attr_eap_message, .name = "EAP-Message", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_eap_msk, .name = "EAP-MSK", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_eap_emsk, .name = "EAP-EMSK", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { .out = &attr_freeradius_proxied_to, .name = "FreeRADIUS-Proxied-To", .type = FR_TYPE_IPV4_ADDR, .dict = &dict_radius },
+       { .out = &attr_ms_mppe_send_key, .name = "MS-MPPE-Send-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_ms_mppe_recv_key, .name = "MS-MPPE-Recv-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { .out = &attr_user_name, .name = "User-Name", .type = FR_TYPE_STRING, .dict = &dict_radius },
        { .out = &attr_user_password, .name = "User-Password", .type = FR_TYPE_STRING, .dict = &dict_radius },
 
index 8e692c3d258c290bfc1ce7ee68d397bfbf3cdb0b..0a2043790bbd67a33923445f2b2a99b4fc67e3ff 100644 (file)
@@ -70,6 +70,8 @@ static fr_dict_attr_t const *attr_ms_chap2_response;
 static fr_dict_attr_t const *attr_ms_chap2_success;
 static fr_dict_attr_t const *attr_ms_mppe_encryption_policy;
 static fr_dict_attr_t const *attr_ms_mppe_encryption_type;
+static fr_dict_attr_t const *attr_ms_mppe_send_key;
+static fr_dict_attr_t const *attr_ms_mppe_recv_key;
 static fr_dict_attr_t const *attr_state;
 static fr_dict_attr_t const *attr_user_name;
 
@@ -87,6 +89,8 @@ fr_dict_attr_autoload_t rlm_eap_mschapv2_dict_attr[] = {
        { .out = &attr_ms_chap2_success, .name = "MS-CHAP2-Success", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { .out = &attr_ms_mppe_encryption_policy, .name = "MS-MPPE-Encryption-Policy", .type = FR_TYPE_UINT32, .dict = &dict_radius },
        { .out = &attr_ms_mppe_encryption_type, .name = "MS-MPPE-Encryption-Type", .type = FR_TYPE_UINT32, .dict = &dict_radius },
+       { .out = &attr_ms_mppe_send_key, .name = "MS-MPPE-Send-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_ms_mppe_recv_key, .name = "MS-MPPE-Recv-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { .out = &attr_state, .name = "State", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { .out = &attr_user_name, .name = "User-Name", .type = FR_TYPE_STRING, .dict = &dict_radius },
        { NULL }
index 4cac713b5237f652199544e902d40bea6bbc0475..e7046f0b583a7bf0a6801041c7f267032233dfc0 100644 (file)
@@ -61,11 +61,15 @@ fr_dict_autoload_t rlm_eap_pwd_dict[] = {
 
 static fr_dict_attr_t const *attr_cleartext_password;
 static fr_dict_attr_t const *attr_framed_mtu;
+static fr_dict_attr_t const *attr_ms_mppe_send_key;
+static fr_dict_attr_t const *attr_ms_mppe_recv_key;
 
 extern fr_dict_attr_autoload_t rlm_eap_pwd_dict_attr[];
 fr_dict_attr_autoload_t rlm_eap_pwd_dict_attr[] = {
        { .out = &attr_cleartext_password, .name = "Cleartext-Password", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
        { .out = &attr_framed_mtu, .name = "Framed-MTU", .type = FR_TYPE_UINT32, .dict = &dict_radius },
+       { .out = &attr_ms_mppe_send_key, .name = "MS-MPPE-Send-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_ms_mppe_recv_key, .name = "MS-MPPE-Recv-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
        { NULL }
 };
 
index 4c5acba600bb6cc3ff7c617b54fe7126a9539910..6efcd83b0e7184f3c99fbbebb77c7279ed8a9823 100644 (file)
@@ -57,11 +57,13 @@ static CONF_PARSER submodule_config[] = {
 };
 
 static fr_dict_t const *dict_freeradius;
+static fr_dict_t const *dict_radius;
 static fr_dict_t const *dict_eap_sim;
 
 extern fr_dict_autoload_t rlm_eap_sim_dict[];
 fr_dict_autoload_t rlm_eap_sim_dict[] = {
        { .out = &dict_freeradius, .proto = "freeradius" },
+       { .out = &dict_radius, .proto = "radius" },
        { .out = &dict_eap_sim, .proto = "eap-sim" },
        { NULL }
 };
@@ -70,6 +72,9 @@ static fr_dict_attr_t const *attr_eap_sim_mk;
 static fr_dict_attr_t const *attr_eap_sim_root;
 static fr_dict_attr_t const *attr_eap_sim_subtype;
 
+static fr_dict_attr_t const *attr_ms_mppe_send_key;
+static fr_dict_attr_t const *attr_ms_mppe_recv_key;
+
 static fr_dict_attr_t const *attr_eap_sim_any_id_req;
 static fr_dict_attr_t const *attr_eap_sim_client_error_code;
 static fr_dict_attr_t const *attr_eap_sim_counter;
@@ -92,6 +97,9 @@ fr_dict_attr_autoload_t rlm_eap_sim_dict_attr[] = {
        { .out = &attr_eap_sim_root, .name = "EAP-SIM-Root", .type = FR_TYPE_TLV, .dict = &dict_freeradius },
        { .out = &attr_eap_sim_subtype, .name = "EAP-SIM-Subtype", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
 
+       { .out = &attr_ms_mppe_send_key, .name = "MS-MPPE-Send-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+       { .out = &attr_ms_mppe_recv_key, .name = "MS-MPPE-Recv-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
+
        { .out = &attr_eap_sim_any_id_req, .name = "EAP-SIM-Any-ID-Req", .type = FR_TYPE_BOOL, .dict = &dict_eap_sim },
        { .out = &attr_eap_sim_client_error_code, .name = "EAP-SIM-Client-Error-Code", .type = FR_TYPE_UINT16, .dict = &dict_eap_sim },
        { .out = &attr_eap_sim_counter, .name = "EAP-SIM-Counter", .type = FR_TYPE_UINT16, .dict = &dict_eap_sim },