summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-10-22 21:38:29 +0200
committerlaforge <laforge@osmocom.org>2019-10-23 18:11:17 +0000
commitf4f4e8c310d63e746bec97e978c374bc58fd678a (patch)
treedd7d41dbb86ec72e12949190f3f5692ca6274dba
parent8a7c2eba437e3a6ce18b60059b652d04008bece2 (diff)
xua_rkm: Don't permit de-registration of rctx with ASP active
-rw-r--r--src/xua_rkm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index 976d649..2d8a25e 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -30,6 +30,7 @@
#include "xua_internal.h"
#include "xua_as_fsm.h"
+#include "xua_asp_fsm.h"
const struct value_string m3ua_rkm_reg_status_vals[] = {
{ M3UA_RKM_REG_SUCCESS, "SUCCESS" },
@@ -338,7 +339,11 @@ static int handle_rkey_dereg(struct osmo_ss7_asp *asp, uint32_t rctx,
return -1;
}
- /* FIXME Reject if any ASP stillactively using this RCTX */
+ /* Reject if ASP is still active */
+ if (asp->fi->state == XUA_ASP_S_ACTIVE) {
+ msgb_append_dereg_res(resp, M3UA_RKM_DEREG_ERR_ASP_ACTIVE, 0);
+ return -1;
+ }
rt = osmo_ss7_route_find_dpc(inst->rtable_system, as->cfg.routing_key.pc);
if (!rt) {