Commit 7082fcfa authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/psea-sabox-fix-apn' into integration_2022_wk43

parents 4b517de1 07abf432
...@@ -167,17 +167,17 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_ ...@@ -167,17 +167,17 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_
case IEI_DNN: case IEI_DNN:
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received DNN IE\n"); LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received DNN IE\n");
psea_msg.dnn_ie.dnn_length = *(buffer + offset++); psea_msg.dnn_ie.dnn_length = *(buffer + offset++);
uint8_t i=0; char apn[APN_MAX_LEN];
char apn[20];
while (*(buffer + offset + i) != ASCII_ACK) { if(psea_msg.dnn_ie.dnn_length <= APN_MAX_LEN &&
apn[i] = *(buffer + offset + i); psea_msg.dnn_ie.dnn_length >= APN_MIN_LEN) {
++i; for (int i = 0 ; i < psea_msg.dnn_ie.dnn_length ; ++i)
} apn[i] = *(buffer + offset + i);
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - APN: %s\n", apn);
} else
LOG_E(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - DNN IE has invalid length\n");
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - APN: %s\n", apn); offset = msg_length;
offset += psea_msg.dnn_ie.dnn_length;
psea_iei = *(buffer + offset++);
break; break;
default: default:
......
...@@ -54,9 +54,18 @@ ...@@ -54,9 +54,18 @@
#define ROC_MODIFY_QOS_RULE_WITHOUT_PF 0b110 /* Modify existing QoS rule without modifying packet filters */ #define ROC_MODIFY_QOS_RULE_WITHOUT_PF 0b110 /* Modify existing QoS rule without modifying packet filters */
#define ROC_RESERVED_1 0b111 /* Reserved */ #define ROC_RESERVED_1 0b111 /* Reserved */
/* DNN - ASCII Codes */ /* DNN - APN
* TS 23.003 9.1
#define ASCII_ACK 0x06 /* Delimiter in the DNN IEI */ * The APN is composed of two parts, the APN Network Identifier (9.1.1) & The APN Operator Identifier (9.1.2).
*
* The DNN information element has a length in the range of 3 to 102 octets.
* The Header is consisted of two octets, the DNN IEI and the Length of the DNN contents fields, each is 1 octet.
* The DNN value payload starts from the 3rd octet.
* The accumulated max length of APN payload is 100 octets.
* The min length of the APN payload is 1 octet.
*/
#define APN_MAX_LEN 100
#define APN_MIN_LEN 1
/* Mandatory Presence IE - TS 24.501 Table 8.3.2.1.1 */ /* Mandatory Presence IE - TS 24.501 Table 8.3.2.1.1 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment