pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/40162?usp=email )
Change subject: rua: Handle event TX_DIRECT_TRANSFER in disconnected state discarding msg
......................................................................
rua: Handle event TX_DIRECT_TRANSFER in disconnected state discarding msg
Related: SYS#7452
Change-Id: Id68f219ce776fbbfaa80d3b3ed976f48bef4f883
---
M src/osmo-hnbgw/context_map_rua.c
1 file changed, 20 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/62/40162/1
diff --git a/src/osmo-hnbgw/context_map_rua.c b/src/osmo-hnbgw/context_map_rua.c
index d408ddd..f545e31 100644
--- a/src/osmo-hnbgw/context_map_rua.c
+++ b/src/osmo-hnbgw/context_map_rua.c
@@ -276,10 +276,25 @@
static void map_rua_disconnected_action(struct osmo_fsm_inst *fi, uint32_t event, void
*data)
{
- struct msgb *ranap_msg = data;
- if (msg_has_l2_data(ranap_msg))
- LOGPFSML(fi, LOGL_NOTICE, "RUA not connected, cannot dispatch RANAP
message\n");
- /* Ignore all events. */
+ struct msgb *ranap_msg;
+
+ switch (event) {
+
+ case MAP_RUA_EV_TX_DIRECT_TRANSFER:
+ /* This can happen if CN is buggy, or in general if there was a race
+ * condition between us forwarding the release towards CN (SCCP Release
+ * or RANAP Iu-ReleaseComplete) and CN sendig whatever to us. */
+ ranap_msg = data;
+ if (msg_has_l2_data(ranap_msg))
+ LOGPFSML(fi, LOGL_NOTICE, "RUA already disconnected, skip forwarding DL RANAP msg
(%u bytes): %s\n",
+ msgb_l2len(ranap_msg), osmo_hexdump(msgb_l2(ranap_msg), msgb_l2len(ranap_msg)));
+ break;
+
+ case MAP_RUA_EV_CN_DISC:
+ case MAP_RUA_EV_HNB_LINK_LOST:
+ /* Ignore all events. */
+ break;
+ }
}
static void map_rua_disrupted_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
@@ -331,6 +346,7 @@
[MAP_RUA_ST_DISCONNECTED] = {
.name = "disconnected",
.in_event_mask = 0
+ | S(MAP_RUA_EV_TX_DIRECT_TRANSFER)
| S(MAP_RUA_EV_CN_DISC)
| S(MAP_RUA_EV_HNB_LINK_LOST)
,
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/40162?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Id68f219ce776fbbfaa80d3b3ed976f48bef4f883
Gerrit-Change-Number: 40162
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>