Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for what is the visited_plmn_id of mme_ue context used? #214

Closed
lezixiao opened this issue Jul 4, 2019 · 2 comments
Closed

for what is the visited_plmn_id of mme_ue context used? #214

lezixiao opened this issue Jul 4, 2019 · 2 comments

Comments

@lezixiao
Copy link

lezixiao commented Jul 4, 2019

Could you please explain your consideration to store last_visited_registered_tai->nas_plmn_id into mme_ue->visited_plmn_id? This mme_ue->visited_plmn_id is also used to derive Kasme in HSS. When the last_visited_registered_tai->nas_plmn_id is different from the current ENB's plmn_id, it will cause UE send security command reject.

emm-handler.c int emm_handle_attach_request(
mme_ue_t *mme_ue, nas_attach_request_t *attach_request)int emm_handle_attach_request(
mme_ue_t *mme_ue, nas_attach_request_t *attach_request)

/* Store UE specific information */
if (attach_request->presencemask &
NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT) {
nas_tracking_area_identity_t *last_visited_registered_tai =
&attach_request->last_visited_registered_tai;

    nas_to_plmn_id(&mme_ue->visited_plmn_id,
        &last_visited_registered_tai->nas_plmn_id);
    ogs_debug("    Visited_PLMN_ID:%06x",
            plmn_id_hexdump(&mme_ue->visited_plmn_id));
} else {
    memcpy(&mme_ue->visited_plmn_id, &mme_ue->tai.plmn_id, PLMN_ID_LEN);

}

mme-fd-path.c void mme_s6a_send_air(mme_ue_t *mme_ue,
nas_authentication_failure_parameter_t authentication_failure_parameter)
/
Set the Visited-PLMN-Id AVP */
ret = fd_msg_avp_new(s6a_visited_plmn_id, 0, &avp);
ogs_assert(ret == 0);
val.os.data = nas_from_plmn_id(&nas_plmn_id, &mme_ue->visited_plmn_id);
val.os.len = PLMN_ID_LEN;
ret = fd_msg_avp_setvalue(avp, &val);
ogs_assert(ret == 0);
ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp);
ogs_assert(ret == 0);

acetcom added a commit that referenced this issue Jul 4, 2019
@acetcom
Copy link
Member

acetcom commented Jul 4, 2019

I don't remember why I implement it like this. -_-;

HSS should use the Visited PLMN ID. So, I've changed to use tai.plmn_id for deriving KASME.
Please let me know if I have misunderstanding!

Thank you very much!

@lezixiao
Copy link
Author

lezixiao commented Jul 5, 2019

thansk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants