Review at https://gerrit.osmocom.org/2269
M3UA: Respond with "Unexpected Message" if ASPTM is received too soon
This was discovered (and fix validated) using m3ua-sgp-aspsm-i-003
of Michale Tuexen's m3ua-testtool.
Change-Id: I8b63e7b5e39a7ef8dd66bf014110a04f5f3dc2a2
---
M src/m3ua.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/69/2269/1
diff --git a/src/m3ua.c b/src/m3ua.c
index 7ae6dcf..7291d0d 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -623,7 +623,8 @@
return M3UA_ERR_UNSUPP_MSG_TYPE;
/* deliver that event to the ASP FSM */
- osmo_fsm_inst_dispatch(asp->fi, event, xua);
+ if (osmo_fsm_inst_dispatch(asp->fi, event, xua) < 0)
+ return M3UA_ERR_UNEXPECTED_MSG;
return 0;
}
--
To view, visit https://gerrit.osmocom.org/2269
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b63e7b5e39a7ef8dd66bf014110a04f5f3dc2a2
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>