forked from acouzens/open5gs
[AMF/MME] Defaults 9 minutes for T3412/T3512
This commit is contained in:
parent
e625f9222a
commit
d33d67b2af
|
@ -255,5 +255,7 @@ udr:
|
|||
port: 7777
|
||||
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
t3512:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -284,5 +284,7 @@ udr:
|
|||
port: 7777
|
||||
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
t3512:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -253,5 +253,7 @@ udr:
|
|||
port: 7777
|
||||
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
t3512:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -581,3 +581,5 @@ usrsctp:
|
|||
# t3423:
|
||||
# value: 720 # 12 minutes * 60 = 720 seconds
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -271,5 +271,7 @@ udr:
|
|||
port: 7777
|
||||
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
t3512:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -264,5 +264,7 @@ udr:
|
|||
port: 7777
|
||||
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
t3512:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -250,5 +250,7 @@ udr:
|
|||
port: 7777
|
||||
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
t3512:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -257,5 +257,7 @@ udr:
|
|||
port: 7777
|
||||
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
t3512:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -265,5 +265,7 @@ udr:
|
|||
port: 7777
|
||||
|
||||
time:
|
||||
t3412:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
t3512:
|
||||
value: 540 # 9 mintues * 60 = 540 seconds
|
||||
|
|
|
@ -97,11 +97,11 @@ int ogs_nas_gprs_timer_from_sec(
|
|||
gprs_timer->unit = OGS_NAS_GPRS_TIMER_UNIT_MULTIPLES_OF_1_MM;
|
||||
gprs_timer->value = timer_value;
|
||||
} else {
|
||||
if (timer_value%10 != 0) {
|
||||
ogs_error("Not multiples of decihours(= 10 minutes)");
|
||||
if (timer_value%6 != 0) {
|
||||
ogs_error("Not multiples of decihours(= 6 minutes)");
|
||||
return OGS_ERROR;
|
||||
}
|
||||
timer_value /= 10; /* multiples of decihours = 10 minutes */
|
||||
timer_value /= 6; /* multiples of decihours = 6 minutes */
|
||||
if (timer_value <= 31) {
|
||||
gprs_timer->unit = OGS_NAS_GPRS_TIMER_UNIT_MULTIPLES_OF_DECI_HH;
|
||||
gprs_timer->value = timer_value;
|
||||
|
|
|
@ -172,7 +172,7 @@ static int amf_context_validation(void)
|
|||
}
|
||||
|
||||
if (self.num_of_ciphering_order == 0) {
|
||||
ogs_error("no amf.security.ciphering_order in '%s'",
|
||||
ogs_error("No amf.security.ciphering_order in '%s'",
|
||||
ogs_app()->file);
|
||||
return OGS_ERROR;
|
||||
}
|
||||
|
@ -181,6 +181,11 @@ static int amf_context_validation(void)
|
|||
ogs_error("Not support GPRS Timer 2 [%d]", (int)self.time.t3502.value);
|
||||
return OGS_ERROR;
|
||||
}
|
||||
if (!self.time.t3512.value) {
|
||||
ogs_error("No amf.time.t3512.value in '%s'",
|
||||
ogs_app()->file);
|
||||
return OGS_ERROR;
|
||||
}
|
||||
if (ogs_nas_gprs_timer_3_from_sec(&gprs_timer, self.time.t3512.value) !=
|
||||
OGS_OK) {
|
||||
ogs_error("Not support GPRS Timer 3 [%d]", (int)self.time.t3512.value);
|
||||
|
@ -1024,6 +1029,8 @@ int amf_context_parse_config(void)
|
|||
} else
|
||||
ogs_warn("unknown key `%s`", t3512_key);
|
||||
}
|
||||
} else if (!strcmp(time_key, "t3412")) {
|
||||
/* handle config in mme */
|
||||
} else if (!strcmp(time_key, "nf_instance")) {
|
||||
/* handle config in app library */
|
||||
} else if (!strcmp(time_key, "subscription")) {
|
||||
|
|
|
@ -129,15 +129,14 @@ ogs_pkbuf_t *gmm_build_registration_accept(amf_ue_t *amf_ue)
|
|||
network_feature_support->
|
||||
ims_voice_over_ps_session_over_3gpp_access_indicator = 1;
|
||||
|
||||
/* Set T3512 */
|
||||
if (amf_self()->time.t3512.value) {
|
||||
rv = ogs_nas_gprs_timer_3_from_sec(
|
||||
&t3512_value->t, amf_self()->time.t3512.value);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
registration_accept->presencemask |=
|
||||
OGS_NAS_5GS_REGISTRATION_ACCEPT_T3512_VALUE_PRESENT;
|
||||
t3512_value->length = 1;
|
||||
}
|
||||
/* Set T3512 : Mandatory in Open5GS */
|
||||
ogs_assert(amf_self()->time.t3512.value);
|
||||
rv = ogs_nas_gprs_timer_3_from_sec(
|
||||
&t3512_value->t, amf_self()->time.t3512.value);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
registration_accept->presencemask |=
|
||||
OGS_NAS_5GS_REGISTRATION_ACCEPT_T3512_VALUE_PRESENT;
|
||||
t3512_value->length = 1;
|
||||
|
||||
/* Set T3502 */
|
||||
if (amf_self()->time.t3502.value) {
|
||||
|
|
|
@ -138,15 +138,11 @@ ogs_pkbuf_t *emm_build_attach_accept(
|
|||
}
|
||||
}
|
||||
|
||||
/* Set T3412 */
|
||||
t3412_value->unit = OGS_NAS_GPRS_TIMER_UNIT_MULTIPLES_OF_DECI_HH;
|
||||
t3412_value->value = 9;
|
||||
|
||||
if (mme_self()->time.t3412.value) {
|
||||
rv = ogs_nas_gprs_timer_from_sec(
|
||||
t3412_value, mme_self()->time.t3412.value);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
}
|
||||
/* Set T3412 : Mandatory in Open5GS */
|
||||
ogs_assert(mme_self()->time.t3412.value);
|
||||
rv = ogs_nas_gprs_timer_from_sec(
|
||||
t3412_value, mme_self()->time.t3412.value);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
|
||||
ogs_debug(" TAI[PLMN_ID:%06x,TAC:%d]",
|
||||
ogs_plmn_id_hexdump(&mme_ue->tai.plmn_id),
|
||||
|
|
|
@ -191,10 +191,58 @@ void emm_state_registered(ogs_fsm_t *s, mme_event_t *e)
|
|||
case MME_TIMER_MOBILE_REACHABLE:
|
||||
ogs_info("[%s] Mobile Reachable timer expired", mme_ue->imsi_bcd);
|
||||
CLEAR_MME_UE_TIMER(mme_ue->t_mobile_reachable);
|
||||
/* TS 24.301 5.3.5
|
||||
* Upon expiry of the mobile reachable timer the network shall
|
||||
* start the implicit detach timer.
|
||||
*/
|
||||
/*
|
||||
* TS 24.301
|
||||
* Section 5.3.5
|
||||
* Handling of the periodic tracking area update timer and
|
||||
* mobile reachable timer (S1 mode only)
|
||||
*
|
||||
* The periodic tracking area updating procedure is used to
|
||||
* periodically notify the availability of the UE to the network.
|
||||
* The procedure is controlled in the UE by timer T3412.
|
||||
* The value of timer T3412 is sent by the network to the UE
|
||||
* in the ATTACH ACCEPT message and can be sent in the TRACKING AREA
|
||||
* UPDATE ACCEPT message. The UE shall apply this value in all tracking
|
||||
* areas of the list of tracking areas assigned to the UE
|
||||
* until a new value is received.
|
||||
*
|
||||
* If timer T3412 received by the UE in an ATTACH ACCEPT or TRACKING
|
||||
* AREA UPDATE ACCEPT message contains an indication that the timer is
|
||||
* deactivated or the timer value is zero, then timer T3412 is
|
||||
* deactivated and the UE shall not perform the periodic tracking area
|
||||
* updating procedure.
|
||||
*
|
||||
* Timer T3412 is reset and started with its initial value,
|
||||
* when the UE changes from EMM-CONNECTED to EMM-IDLE mode.
|
||||
*
|
||||
* Timer T3412 is stopped when the UE enters EMM-CONNECTED mode or
|
||||
* the EMM-DEREGISTERED state. If the UE is attached for emergency
|
||||
* bearer services, and timer T3412 expires, the UE shall not initiate
|
||||
* a periodic tracking area updating procedure, but shall locally detach
|
||||
* from the network. When the UE is camping on a suitable cell, it may
|
||||
* re-attach to regain normal service.
|
||||
*
|
||||
* When a UE is not attached for emergency bearer services, and timer
|
||||
* T3412 expires, the periodic tracking area updating procedure shall
|
||||
* be started and the timer shall be set to its initial value
|
||||
* for the next start.
|
||||
*
|
||||
* If the UE is not attached for emergency bearer services, the mobile
|
||||
* reachable timer shall be longer than T3412. In this case, by default,
|
||||
* the mobile reachable timer is 4 minutes greater than timer T3412.
|
||||
*
|
||||
* Upon expiry of the mobile reachable timer the network shall start
|
||||
* the implicit detach timer. The value of the implicit detach timer is
|
||||
* network dependent. If ISR is activated, the default value of
|
||||
* the implicit detach timer is 4 minutes greater than timer T3423.
|
||||
* If the implicit detach timer expires before the UE contacts
|
||||
* the network, the network shall implicitly detach the UE. If the MME
|
||||
* includes timer T3346 in the TRACKING AREA UPDATE REJECT message or
|
||||
* the SERVICE REJECT message and timer T3346 is greater than timer
|
||||
* T3412, the MME sets the mobile reachable timer and the implicit
|
||||
* detach timer such that the sum of the timer values is greater than
|
||||
* timer T3346.
|
||||
*/
|
||||
ogs_debug("[%s] Starting Implicit Detach timer",
|
||||
mme_ue->imsi_bcd);
|
||||
ogs_timer_start(mme_ue->t_implicit_detach.timer,
|
||||
|
|
|
@ -193,6 +193,9 @@ static int mme_context_prepare(void)
|
|||
self.diam_config->cnf_port = DIAMETER_PORT;
|
||||
self.diam_config->cnf_port_tls = DIAMETER_SECURE_PORT;
|
||||
|
||||
/* Set the default T3412 to 9 minutes for backward compatibility. */
|
||||
self.time.t3412.value = 540;
|
||||
|
||||
return OGS_OK;
|
||||
}
|
||||
|
||||
|
@ -267,7 +270,7 @@ static int mme_context_validation(void)
|
|||
return OGS_ERROR;
|
||||
}
|
||||
if (self.num_of_ciphering_order == 0) {
|
||||
ogs_error("no mme.security.ciphering_order in '%s'",
|
||||
ogs_error("No mme.security.ciphering_order in '%s'",
|
||||
ogs_app()->file);
|
||||
return OGS_ERROR;
|
||||
}
|
||||
|
@ -276,6 +279,11 @@ static int mme_context_validation(void)
|
|||
ogs_error("Not support GPRS Timer [%d]", (int)self.time.t3402.value);
|
||||
return OGS_ERROR;
|
||||
}
|
||||
if (!self.time.t3412.value) {
|
||||
ogs_error("No mme.time.t3412.value in '%s'",
|
||||
ogs_app()->file);
|
||||
return OGS_ERROR;
|
||||
}
|
||||
if (ogs_nas_gprs_timer_from_sec(&gprs_timer, self.time.t3412.value) !=
|
||||
OGS_OK) {
|
||||
ogs_error("Not support GPRS Timer [%d]", (int)self.time.t3412.value);
|
||||
|
|
|
@ -1712,6 +1712,58 @@ void s1ap_handle_ue_context_release_action(enb_ue_t *enb_ue)
|
|||
if (OGS_FSM_CHECK(&mme_ue->sm, emm_state_registered)) {
|
||||
ogs_debug("Mobile Reachable timer started for IMSI[%s]",
|
||||
mme_ue->imsi_bcd);
|
||||
/*
|
||||
* TS 24.301
|
||||
* Section 5.3.5
|
||||
* Handling of the periodic tracking area update timer and
|
||||
* mobile reachable timer (S1 mode only)
|
||||
*
|
||||
* The periodic tracking area updating procedure is used to
|
||||
* periodically notify the availability of the UE to the network.
|
||||
* The procedure is controlled in the UE by timer T3412.
|
||||
* The value of timer T3412 is sent by the network to the UE
|
||||
* in the ATTACH ACCEPT message and can be sent in the TRACKING AREA
|
||||
* UPDATE ACCEPT message. The UE shall apply this value in all tracking
|
||||
* areas of the list of tracking areas assigned to the UE
|
||||
* until a new value is received.
|
||||
*
|
||||
* If timer T3412 received by the UE in an ATTACH ACCEPT or TRACKING
|
||||
* AREA UPDATE ACCEPT message contains an indication that the timer is
|
||||
* deactivated or the timer value is zero, then timer T3412 is
|
||||
* deactivated and the UE shall not perform the periodic tracking area
|
||||
* updating procedure.
|
||||
*
|
||||
* Timer T3412 is reset and started with its initial value,
|
||||
* when the UE changes from EMM-CONNECTED to EMM-IDLE mode.
|
||||
*
|
||||
* Timer T3412 is stopped when the UE enters EMM-CONNECTED mode or
|
||||
* the EMM-DEREGISTERED state. If the UE is attached for emergency
|
||||
* bearer services, and timer T3412 expires, the UE shall not initiate
|
||||
* a periodic tracking area updating procedure, but shall locally detach
|
||||
* from the network. When the UE is camping on a suitable cell, it may
|
||||
* re-attach to regain normal service.
|
||||
*
|
||||
* When a UE is not attached for emergency bearer services, and timer
|
||||
* T3412 expires, the periodic tracking area updating procedure shall
|
||||
* be started and the timer shall be set to its initial value
|
||||
* for the next start.
|
||||
*
|
||||
* If the UE is not attached for emergency bearer services, the mobile
|
||||
* reachable timer shall be longer than T3412. In this case, by default,
|
||||
* the mobile reachable timer is 4 minutes greater than timer T3412.
|
||||
*
|
||||
* Upon expiry of the mobile reachable timer the network shall start
|
||||
* the implicit detach timer. The value of the implicit detach timer is
|
||||
* network dependent. If ISR is activated, the default value of
|
||||
* the implicit detach timer is 4 minutes greater than timer T3423.
|
||||
* If the implicit detach timer expires before the UE contacts
|
||||
* the network, the network shall implicitly detach the UE. If the MME
|
||||
* includes timer T3346 in the TRACKING AREA UPDATE REJECT message or
|
||||
* the SERVICE REJECT message and timer T3346 is greater than timer
|
||||
* T3412, the MME sets the mobile reachable timer and the implicit
|
||||
* detach timer such that the sum of the timer values is greater than
|
||||
* timer T3346.
|
||||
*/
|
||||
ogs_timer_start(mme_ue->t_mobile_reachable.timer,
|
||||
ogs_time_from_sec(mme_self()->time.t3412.value + 240));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue