]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use correct dictionary, and fix dictionary to be correct
authorAlan T. DeKok <aland@freeradius.org>
Thu, 13 Dec 2018 19:49:09 +0000 (14:49 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 13 Dec 2018 20:02:26 +0000 (15:02 -0500)
share/dictionary/eap/aka/dictionary.freeradius
share/dictionary/eap/aka/dictionary.rfc4187
share/dictionary/eap/sim/dictionary.freeradius
src/modules/rlm_eap/lib/sim/base.c
src/modules/rlm_eap/lib/sim/sim_attrs.h
src/modules/rlm_eap/types/rlm_eap_aka/rlm_eap_aka.c
src/modules/rlm_eap/types/rlm_eap_sim/rlm_eap_sim.c

index f5d79e187c510532611aa635c067fabf2b3b3fe8..a3deadd0f351a3aad972a2178ef05cb63e51e2eb 100644 (file)
@@ -26,3 +26,9 @@ ATTRIBUTE     EAP-AKA-XRES                            260     octets
 ATTRIBUTE      EAP-AKA-CK                              261     octets
 ATTRIBUTE      EAP-AKA-IK                              262     octets
 ATTRIBUTE      EAP-AKA-AUTHN                           263     octets
+
+#
+#  Keys to store for fast-reauthentication
+#
+ATTRIBUTE      EAP-SIM-MK                              264     octets          # Master key
+ATTRIBUTE      EAP-AKA-AK                              265     octets
index 7969b90ee909487c264d04c8bf4a90336086a2ca..76890f7ed889509d99f6fda875f836ded7d1195e 100644 (file)
@@ -65,27 +65,3 @@ VALUE        EAP-AKA-Bidding                 Prefer-AKA              0
 VALUE  EAP-AKA-Bidding                 Prefer-AKA-Prime        32768   # D Bit
 
 ATTRIBUTE      EAP-AKA-Result-Ind                      137     bool
-
-#
-#  Internal attributes used by FreeRADIUS
-#
-FLAGS  internal
-ATTRIBUTE      EAP-AKA-Subtype                         256     integer
-
-VALUE  EAP-AKA-Subtype                 AKA-Challenge           1
-VALUE  EAP-AKA-Subtype                 AKA-Authentication-Reject 2
-VALUE  EAP-AKA-Subtype                 AKA-Synchronization-Failure 4
-VALUE  EAP-AKA-Subtype                 AKA-Identity            5
-VALUE  EAP-AKA-Subtype                 AKA-Notification        12
-VALUE  EAP-AKA-Subtype                 AKA-Reauthentication    13
-VALUE  EAP-AKA-Subtype                 AKA-Client-Error        14
-
-ATTRIBUTE      EAP-AKA-XRES                            260     octets
-ATTRIBUTE      EAP-AKA-CK                              261     octets
-ATTRIBUTE      EAP-AKA-IK                              262     octets
-ATTRIBUTE      EAP-AKA-AK                              263     octets
-
-#
-#  Keys to store for fast-reauthentication
-#
-ATTRIBUTE      EAP-SIM-MK                              264     octets          # Master key
index 0d89cd08f462bae826c40cda1d33cfd431691c37..e5e1d19c2bfb97c473879f0d813536d8e1617a78 100644 (file)
@@ -20,6 +20,8 @@ ATTRIBUTE     EAP-SIM-HMAC                            257     string
 ATTRIBUTE      EAP-SIM-Key                             258     octets
 ATTRIBUTE      EAP-SIM-Extra                           259     octets
 
+ATTRIBUTE      EAP-SIM-MK                              264     octets          # Master key
+
 ATTRIBUTE      EAP-SIM-SRES                            1222    octets
 ATTRIBUTE      EAP-SIM-KC                              1223    octets
-ATTRIBUTE      EAP-SIM-State                           1224    integer
\ No newline at end of file
+ATTRIBUTE      EAP-SIM-State                           1224    integer
index eaa569f478df3653532a4aaa3434d652802c0327..ec7f369d596b24a78cdf4ef7dd2fa19dbc0af0bc 100644 (file)
@@ -184,8 +184,12 @@ int fr_sim_init(void)
                return 0;
        }
 
-       if (fr_dict_autoload(libfreeradius_sim_dict) < 0) return -1;
+       if (fr_dict_autoload(libfreeradius_sim_dict) < 0) {
+               PERROR("Failed loading SIM dictionary");
+               return -1;
+       }
        if (fr_dict_attr_autoload(libfreeradius_sim_dict_attr) < 0) {
+               PERROR("Failed loading SIM attributes");
                fr_dict_autofree(libfreeradius_sim_dict);
                return -1;
        }
index 0c43bee2596d2ffa0cce35d926bf4ba70bf3115e..38890a21782d5572b1c9e6e606edd614898e6437 100644 (file)
@@ -26,6 +26,7 @@
 #include <freeradius-devel/protocol/eap/sim/rfc4187.h>
 #include <freeradius-devel/protocol/eap/aka/dictionary.h>
 #include <freeradius-devel/protocol/eap/aka/rfc4187.h>
+#include <freeradius-devel/protocol/eap/aka/freeradius.h>
 
 /*
  *     Sanity check on dictionaries...
index 17b323e588e4df18e5c5f927765e93a742637b15..ce983dae7f2e679974c097a91559b38b3afded34 100644 (file)
@@ -33,6 +33,7 @@ RCSID("$Id$")
 
 #include <freeradius-devel/server/rad_assert.h>
 #include <freeradius-devel/protocol/eap/aka/rfc4187.h>
+#include <freeradius-devel/protocol/eap/aka/freeradius.h>
 
 #ifndef EAP_TLS_MPPE_KEY_LEN
 #  define EAP_TLS_MPPE_KEY_LEN     32
index ff60e82ad9900ed368e46d687b81ea3d226c5931..7a253e87e84f1aab1908d04c7a7b31e880bec360 100644 (file)
@@ -93,8 +93,8 @@ static fr_dict_attr_t const *attr_eap_sim_version_list;
 
 extern fr_dict_attr_autoload_t rlm_eap_sim_dict_attr[];
 fr_dict_attr_autoload_t rlm_eap_sim_dict_attr[] = {
-       { .out = &attr_eap_sim_mk, .name = "EAP-SIM-MK", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
-       { .out = &attr_eap_sim_subtype, .name = "EAP-SIM-Subtype", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
+       { .out = &attr_eap_sim_mk, .name = "EAP-SIM-MK", .type = FR_TYPE_OCTETS, .dict = &dict_eap_sim },
+       { .out = &attr_eap_sim_subtype, .name = "EAP-SIM-Subtype", .type = FR_TYPE_UINT32, .dict = &dict_eap_sim },
 
        { .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 },
@@ -1148,7 +1148,10 @@ static rlm_rcode_t mod_session_init(void *instance, eap_session_t *eap_session)
 
 static int mod_load(void)
 {
-       if (fr_sim_init() < 0) return -1;
+       if (fr_sim_init() < 0) {
+               ERROR("Failed initializing SIM library");
+               return -1;
+       }
 
        sim_xlat_register();