pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmocore/+/39753?usp=email )
Change subject: iuup: Explicitly discard Iu-UP-DATA.req in Initialization state
......................................................................
iuup: Explicitly discard Iu-UP-DATA.req in Initialization state
Since Initialization procedure is asyncrhonous (need to wait for IuUP
ACK from peer), it may be that the user initializes the IuUP layer and
starts sending/forarding IuUP data to it before the initialization
finishes.
Before this patch, an error would be logged for each such Data request.
Let's instead explicitly expect this event and hence avoid logging a
generic FSM error log "{Initialisation}: Event IuUP-DATA-req not
permitted" and log in INFO level and discard the message.
Change-Id: I424be5718cdd12cfd0ce80108a002ce68d3e17aa
---
M src/gsm/iuup.c
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/39753/1
diff --git a/src/gsm/iuup.c b/src/gsm/iuup.c
index 4991213..df303e5 100644
--- a/src/gsm/iuup.c
+++ b/src/gsm/iuup.c
@@ -714,6 +714,13 @@
/* the only permitted 'config req' type is the request to release the instance
*/
osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_NULL, 0, 0);
break;
+ case IUUP_FSM_EVT_IUUP_DATA_REQ:
+ /* Data coming down from RNL (user) towards TNL (transport).
+ * Discard since we are still not in Data Transfer Ready State. */
+ irp = data;
+ LOGPFSML(fi, LOGL_INFO, "Iu-UP-DATA.req while still initializing,
discarding\n");
+ msgb_free(irp->oph.msg);
+ break;
case IUUP_FSM_EVT_INIT:
itp = data;
if (iuup_rx_initialization(iui, itp))
@@ -825,6 +832,7 @@
},
[IUUP_FSM_ST_INIT] = {
.in_event_mask = S(IUUP_FSM_EVT_IUUP_CONFIG_REQ) |
+ S(IUUP_FSM_EVT_IUUP_DATA_REQ) |
S(IUUP_FSM_EVT_INIT) |
S(IUUP_FSM_EVT_LAST_INIT_ACK) |
S(IUUP_FSM_EVT_INIT_NACK),
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/39753?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I424be5718cdd12cfd0ce80108a002ce68d3e17aa
Gerrit-Change-Number: 39753
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>