canghaiwuhen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/41942?usp=email )


Change subject: Modify the QoS length to ensure compatibility with some GPRS 
modules, such as Air20X.
......................................................................

Modify the QoS length to ensure compatibility with some GPRS modules, such as 
Air20X.

Change-Id: Iee49745809195fe7d0897dd1e9cba2427ff7008e
---
M src/sgsn/gprs_sm.c
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/42/41942/1

diff --git a/src/sgsn/gprs_sm.c b/src/sgsn/gprs_sm.c
index bcf2923..919dbf3 100644
--- a/src/sgsn/gprs_sm.c
+++ b/src/sgsn/gprs_sm.c
@@ -206,7 +206,11 @@

        /* FIXME: copy QoS parameters from original request */
        //msgb_lv_put(msg, pdp->lib->qos_neg.l, pdp->lib->qos_neg.v);
-       msgb_lv_put(msg, sizeof(default_qos), (uint8_t *)&default_qos);
+//     msgb_lv_put(msg, sizeof(default_qos), (uint8_t *)&default_qos);
+
+       /* HACK: Force R97 QoS length (3 bytes) to avoid crashing legacy modems
+        * which cannot handle R99 extensions (14 bytes). */
+       msgb_lv_put(msg, 3, (uint8_t *)&default_qos);

        /* Radio priority 10.5.7.2 */
        msgb_v_put(msg, pdp->lib->radio_pri);

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

Gerrit-MessageType: newchange
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iee49745809195fe7d0897dd1e9cba2427ff7008e
Gerrit-Change-Number: 41942
Gerrit-PatchSet: 1
Gerrit-Owner: canghaiwuhen <[email protected]>

Reply via email to