send PDN error cause if needed (#352)
* initial commit: respond with ESM Cause PDN-Type if we only allow IPv4 or IPv6 (not both) * works as intended, removing debug statement. * Fix the indentation and add the reference Co-authored-by: Sukchan Lee <acetcom@gmail.com>
This commit is contained in:
parent
96af2d0337
commit
2abdef74cb
|
@ -172,6 +172,34 @@ ogs_pkbuf_t *esm_build_activate_default_bearer_context_request(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* In TS24.301 V15.6.0
|
||||
* 6.5.1.3 UE requested PDN connectivity procedure accepted by the network
|
||||
*
|
||||
* If connectivity with the requested PDN is accepted,
|
||||
* but with a restriction of IP version (i.e. both an IPv4 address and
|
||||
* an IPv6 prefix is requested, but only one particular IP version, or
|
||||
* only single IP version bearers are supported/allowed by the network),
|
||||
* ESM cause #50 "PDN type IPv4 only allowed",
|
||||
* #51 "PDN type IPv6 only allowed", or
|
||||
* #52 "single address bearers only allowed", respectively, shall be
|
||||
* included in the ACTIVATE DEFAULT EPS BEARER CONTEXT REQUEST message.
|
||||
*/
|
||||
if (sess->request_type.pdn_type ==
|
||||
OGS_NAS_PDN_CONNECTIVITY_PDN_TYPE_IPV4V6) {
|
||||
if (pdn_address->pdn_type == OGS_GTP_PDN_TYPE_IPV4) {
|
||||
activate_default_eps_bearer_context_request->esm_cause =
|
||||
ESM_CAUSE_PDN_TYPE_IPV4_ONLY_ALLOWED;
|
||||
activate_default_eps_bearer_context_request->presencemask |=
|
||||
OGS_NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT;
|
||||
} else if (pdn_address->pdn_type == OGS_GTP_PDN_TYPE_IPV6) {
|
||||
activate_default_eps_bearer_context_request->esm_cause =
|
||||
ESM_CAUSE_PDN_TYPE_IPV6_ONLY_ALLOWED;
|
||||
activate_default_eps_bearer_context_request->presencemask |=
|
||||
OGS_NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT;
|
||||
}
|
||||
}
|
||||
|
||||
if (pdn->ambr.downlink || pdn->ambr.uplink) {
|
||||
activate_default_eps_bearer_context_request->presencemask |=
|
||||
OGS_NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT;
|
||||
|
|
Loading…
Reference in New Issue