Attention is currently required from: canghaiwuhen.

pespin has posted comments on this change by canghaiwuhen. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/41948?usp=email )

Change subject: Modified to dynamically adjust the returned QoS length to 
ensure compatibility with older modules.
......................................................................


Patch Set 3:

(3 comments)

File src/sgsn/gprs_sm.c:

https://gerrit.osmocom.org/c/osmo-sgsn/+/41948/comment/917e6626_43ca723f?usp=email
 :
PS3, Line 215:  uint8_t qos_len = pdp->req_qos_len;
Ideally we should store a struct with the decoded fields parsed, and then use 
an encode counterpart which would encode amount of fields based on the parsed 
request. See how that's done in open5gs.git/lib/gtp/v1/types.c 
ogs_gtp1_parse_pdp_context() and ogs_gtp1_build_pdp_context().


https://gerrit.osmocom.org/c/osmo-sgsn/+/41948/comment/9af3517a_5a42526d?usp=email
 :
PS3, Line 217:          qos_len = 3; // Safety fallback for R97
This is backed on 3GPP TS 24.008 10.5.6.5:
"""
A QoS IE received without octets 6-22, without octets 14-22, without octets 
15-22, without octets 17-22, without
octets 19-22 or without octets 21-22 shall be accepted by the receiving entity.

NOTE: This behavior is required for interworking with entities supporting an 
earlier version of the protocol, or
when the Maximum bit rate for downlink or for downlink and uplink is negotiated 
to a value lower than
8700 kbps.

"""


https://gerrit.osmocom.org/c/osmo-sgsn/+/41948/comment/3a970f63_4b97991c?usp=email
 :
PS3, Line 221:  msgb_lv_put(msg, qos_len, (uint8_t *)&default_qos);
let's better do:

    uint8_t qos_len;

    if (pdp->req_qos_len == 0 || pdp->req_qos_len > sizeof(default_qos))
        qos_len = sizeof(default_qos);
    else
        qos_len = pdp->req_qos_len;



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/41948?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I872d882de4ce186f644b1b3ab684963050709d4f
Gerrit-Change-Number: 41948
Gerrit-PatchSet: 3
Gerrit-Owner: canghaiwuhen <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <[email protected]>
Gerrit-CC: pespin <[email protected]>
Gerrit-Attention: canghaiwuhen <[email protected]>
Gerrit-Comment-Date: Mon, 26 Jan 2026 14:43:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Reply via email to