From f7889f2be32351f3e376503c22b3c5f1a63d0fdc Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 22 Aug 2025 18:44:18 +0200 Subject: [PATCH] [5G-NAS] Avoid parse failure with Packet Filter match-all type --- lib/nas/5gs/types.c | 2 ++ src/smf/gsm-handler.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/nas/5gs/types.c b/lib/nas/5gs/types.c index d88d2d872..ffe32b804 100644 --- a/lib/nas/5gs/types.c +++ b/lib/nas/5gs/types.c @@ -843,6 +843,8 @@ static int parse_qos_rules_packet_filter_list(ogs_nas_qos_rule_t *rule, const ui sizeof(rule->pf[i].content.component[j].type)); len += sizeof(rule->pf[i].content.component[j].type); switch(rule->pf[i].content.component[j].type) { + case OGS_PACKET_FILTER_MATCH_ALL: + break; case OGS_PACKET_FILTER_PROTOCOL_IDENTIFIER_NEXT_HEADER_TYPE: if (size+len+ sizeof(rule->pf[i].content.component[j].proto) > diff --git a/src/smf/gsm-handler.c b/src/smf/gsm-handler.c index aaf623bc7..faeb1e06e 100644 --- a/src/smf/gsm-handler.c +++ b/src/smf/gsm-handler.c @@ -112,6 +112,8 @@ static int reconfigure_packet_filter( pf->direction = qos_rule->pf[i].direction; for (j = 0; j < qos_rule->pf[i].content.num_of_component; j++) { switch(qos_rule->pf[i].content.component[j].type) { + case OGS_PACKET_FILTER_MATCH_ALL: + break; case OGS_PACKET_FILTER_PROTOCOL_IDENTIFIER_NEXT_HEADER_TYPE: pf->ipfw_rule.proto = qos_rule->pf[i].content.component[j].proto; break;