osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30206 )
Change subject: sgsn_libgtp: cb_data_ind: remove mm_idle assert
......................................................................
sgsn_libgtp: cb_data_ind: remove mm_idle assert
Log an error message and drop the packet instead of asserting if
mm state fsm is in ST_MM_IDLE while the gmm fsm is in
ST_GMM_REGISTERED_NORMAL.
Fixes: OS#5725
Change-Id: I9dab98917c622b36dae22399bb359d747a598208
---
M src/sgsn/sgsn_libgtp.c
1 file changed, 13 insertions(+), 4 deletions(-)
Approvals:
daniel: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c
index 5300800..033637d 100644
--- a/src/sgsn/sgsn_libgtp.c
+++ b/src/sgsn/sgsn_libgtp.c
@@ -768,15 +768,24 @@
msgb_free(msg);
return -1;
case ST_GMM_REGISTERED_NORMAL:
- OSMO_ASSERT(mm->gb.mm_state_fsm->state != ST_MM_IDLE);
- if (mm->gb.mm_state_fsm->state == ST_MM_STANDBY) {
+ switch (mm->gb.mm_state_fsm->state) {
+ case ST_MM_IDLE:
+ LOGP(DGPRS, LOGL_ERROR, "Dropping DL packet for MS in MM state %s\n",
+ osmo_fsm_inst_state_name(mm->gb.mm_state_fsm));
+ msgb_free(msg);
+ return -1;
+ case ST_MM_READY:
+ /* Go ahead */
+ break;
+ case ST_MM_STANDBY:
LOGMMCTXP(LOGL_INFO, mm, "Paging MS in GMM state %s, MM state %s\n",
osmo_fsm_inst_state_name(mm->gmm_fsm),
osmo_fsm_inst_state_name(mm->gb.mm_state_fsm));
gprs_gb_page_ps_ra(mm);
- }
- /* FIXME: queue the packet we received from GTP */
+ /* FIXME: queue the packet we received from GTP */
+ break;
+ }
break;
default:
LOGP(DGPRS, LOGL_ERROR, "GTP DATA IND for TLLI %08X in state "
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30206
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I9dab98917c622b36dae22399bb359d747a598208
Gerrit-Change-Number: 30206
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: osmith.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30206 )
Change subject: sgsn_libgtp: cb_data_ind: remove mm_idle assert
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30206
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I9dab98917c622b36dae22399bb359d747a598208
Gerrit-Change-Number: 30206
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 17 Nov 2022 13:13:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment