From: Arran Cudbard-Bell Date: Tue, 12 Dec 2017 12:14:19 +0000 (+0000) Subject: Add SIM method hint table so we can warn when we think the wrong SIM/AKA flavour... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1fdfcac6623768f6108e19fdb96fcfca485090;p=thirdparty%2Ffreeradius-server.git Add SIM method hint table so we can warn when we think the wrong SIM/AKA flavour is being used --- diff --git a/src/modules/rlm_eap/lib/sim/id.c b/src/modules/rlm_eap/lib/sim/id.c index d2794036df4..2a1b5757877 100644 --- a/src/modules/rlm_eap/lib/sim/id.c +++ b/src/modules/rlm_eap/lib/sim/id.c @@ -29,9 +29,16 @@ #define us(x) (uint8_t) x FR_NAME_NUMBER const sim_id_request_table[] = { - { "Id-Any-Req", SIM_ANY_ID }, - { "Permanent-Id-Req", SIM_PERMANENT_ID_REQ }, - { "FullAuth-Id-Req", SIM_FULLAUTH_ID_REQ }, + { "Id-Any-Req", SIM_ANY_ID_REQ }, + { "Permanent-Id-Req", SIM_PERMANENT_ID_REQ }, + { "FullAuth-Id-Req", SIM_FULLAUTH_ID_REQ }, + { NULL } +}; + +FR_NAME_NUMBER const sim_id_method_hint_table[] = { + { "SIM", SIM_METHOD_HINT_SIM }, + { "AKA", SIM_METHOD_HINT_AKA }, + { "AKA'", SIM_METHOD_HINT_AKA_PRIME }, { NULL } }; diff --git a/src/modules/rlm_eap/lib/sim/id.h b/src/modules/rlm_eap/lib/sim/id.h index ab9a7faba25..fcdb556d146 100644 --- a/src/modules/rlm_eap/lib/sim/id.h +++ b/src/modules/rlm_eap/lib/sim/id.h @@ -70,12 +70,14 @@ typedef enum { /** Identity request types */ typedef enum { - SIM_ANY_ID, //!< Request IMSI, Pseudonym or Fast-reauth. - SIM_PERMANENT_ID_REQ, //!< Request IMSI. - SIM_FULLAUTH_ID_REQ //!< Request IMSI or Pseudonym. + SIM_NO_ID_REQ = 0, //!< We're not requesting any ID. + SIM_ANY_ID_REQ, //!< Request IMSI, Pseudonym or Fast-reauth. + SIM_PERMANENT_ID_REQ, //!< Request IMSI. + SIM_FULLAUTH_ID_REQ //!< Request IMSI or Pseudonym. } fr_sim_id_req_type_t; extern FR_NAME_NUMBER const sim_id_request_table[]; +extern FR_NAME_NUMBER const sim_id_method_hint_table[]; #define SIM_ID_TAG_PSEUDONYM_SIM_B64 55 #define SIM_ID_TAG_PSEUDONYM_AKA_B64 54