Attention is currently required from: fixeria, pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41993?usp=email )
Change subject: Lb: Handle N-PCSTATE.ind
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc/lb.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/41993/comment/8a1fe99f_820c54a2?usp… :
PS2, Line 147: /* Find an SMLC by its remote sigtran point code on a given cs7 instance. */
> The body of this function (as well as the one above) doesn't really do much "finding", it just retur […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41993?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I16900b9c2b840d4c7d8471c1f69b19601e892b2d
Gerrit-Change-Number: 41993
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Feb 2026 16:03:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: fixeria, pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41993?usp=email )
Change subject: Lb: Handle N-PCSTATE.ind
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File src/osmo-bsc/lb.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/41993/comment/d2b5c1eb_7a798777?usp… :
PS2, Line 147: /* Find an SMLC by its remote sigtran point code on a given cs7 instance. */
The body of this function (as well as the one above) doesn't really do much "finding", it just returns the one(?) smlc_config if the conditions match.
(I just think it's funny reading the code after reading the comment :-)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41993?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I16900b9c2b840d4c7d8471c1f69b19601e892b2d
Gerrit-Change-Number: 41993
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Feb 2026 16:02:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
canghaiwuhen has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email )
Change subject: Some older modules, such as the Air20X module, may crash during PDP attachment due to excessively long QoS response packets. If the PDP is not released after successful attachment, the module will restart, and subsequent TCP connections will fail.
......................................................................
Some older modules, such as the Air20X module, may crash during PDP attachment due to excessively long QoS response packets.
If the PDP is not released after successful attachment, the module will restart, and subsequent TCP connections will fail.
Related: OS#6922
Change-Id: I11c24b64f0e49cf80c825969dbf018b2948d855c
---
M src/sgsn/gprs_gmm.c
M src/sgsn/gprs_sm.c
2 files changed, 29 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/50/42050/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I11c24b64f0e49cf80c825969dbf018b2948d855c
Gerrit-Change-Number: 42050
Gerrit-PatchSet: 3
Gerrit-Owner: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-CC: Jenkins Builder
canghaiwuhen has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email )
Change subject: Some older modules, such as the Air20X module, may crash during PDP attachment due to excessively long QoS response packets. If the PDP is not released after successful attachment, the module will restart, and subsequent TCP connections will fail.
......................................................................
Some older modules, such as the Air20X module, may crash during PDP attachment due to excessively long QoS response packets. If the PDP is not released after successful attachment, the module will restart, and subsequent TCP connections will fail.
Related: OS#6922
Change-Id: I11c24b64f0e49cf80c825969dbf018b2948d855c
---
M src/sgsn/gprs_gmm.c
M src/sgsn/gprs_sm.c
2 files changed, 29 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/50/42050/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I11c24b64f0e49cf80c825969dbf018b2948d855c
Gerrit-Change-Number: 42050
Gerrit-PatchSet: 2
Gerrit-Owner: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-CC: Jenkins Builder
canghaiwuhen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email )
Change subject: Related: OS#6922
......................................................................
Related: OS#6922
Some older modules, such as the Air20X module, may crash during PDP attachment due to excessively long QoS response packets. If the PDP is not released after successful attachment, the module will restart, and subsequent TCP connections will fail.
Change-Id: I11c24b64f0e49cf80c825969dbf018b2948d855c
---
M src/sgsn/gprs_gmm.c
M src/sgsn/gprs_sm.c
2 files changed, 29 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/50/42050/1
diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c
index 3d4b940..ce77d35 100644
--- a/src/sgsn/gprs_gmm.c
+++ b/src/sgsn/gprs_gmm.c
@@ -1336,7 +1336,15 @@
goto rejected;
}
OSMO_STRLCPY_ARRAY(ctx->imsi, mi.imsi);
- }
+ } else {
+ /* [FIX] Known IMSI context. If the module initiates an Attach, it means it has restarted and lost its PDP state.
+ * We must clean up the old PDP context on the SGSN side; otherwise, the SGSN will not recreate them, leading to communication failure. */
+ struct sgsn_pdp_ctx *pdp, *pdp2;
+ llist_for_each_entry_safe(pdp, pdp2, &ctx->pdp_list, list) {
+ LOGMMCTXP(LOGL_NOTICE, ctx, "Re-Attach: Dropping stale PDP context for NSAPI=%u\n", pdp->nsapi);
+ sgsn_pdp_ctx_terminate(pdp);
+ }
+ }
break;
case GSM_MI_TYPE_TMSI:
/* Try to find MM context based on P-TMSI */
@@ -1354,7 +1362,14 @@
goto rejected;
}
ctx->p_tmsi = mi.tmsi;
- }
+ } else {
+ /* [FIX] Known P-TMSI context. Similarly, if the module re-attaches, clean up the old PDP context. */
+ struct sgsn_pdp_ctx *pdp, *pdp2;
+ llist_for_each_entry_safe(pdp, pdp2, &ctx->pdp_list, list) {
+ LOGMMCTXP(LOGL_NOTICE, ctx, "Re-Attach: Dropping stale PDP context for NSAPI=%u\n", pdp->nsapi);
+ sgsn_pdp_ctx_terminate(pdp);
+ }
+ }
break;
default:
LOGMMCTXP(LOGL_NOTICE, ctx, "Rejecting ATTACH REQUEST with "
diff --git a/src/sgsn/gprs_sm.c b/src/sgsn/gprs_sm.c
index bcf2923..aebebe7 100644
--- a/src/sgsn/gprs_sm.c
+++ b/src/sgsn/gprs_sm.c
@@ -206,7 +206,18 @@
/* 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);
+
+ /* Use the explicitly stored original Air Interface QoS length (req_qos_len).
+ * Modern modules send 14+ bytes (R99) and expect full responses.
+ * SOLUTION: Reply with exactly the length they asked for.
+ */
+ uint8_t qos_len = sizeof(default_qos);
+ if (pdp->lib && pdp->lib->qos_req.l > 1)
+ qos_len = pdp->lib->qos_req.l - 1;
+ if (qos_len > sizeof(default_qos))
+ qos_len = sizeof(default_qos);
+ msgb_lv_put(msg, qos_len, (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/+/42050?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: I11c24b64f0e49cf80c825969dbf018b2948d855c
Gerrit-Change-Number: 42050
Gerrit-PatchSet: 1
Gerrit-Owner: canghaiwuhen <canghaiwuhen(a)gmail.com>