pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40574?usp=email )
Change subject: xua_rkm: Reply RKM RKEY REG with err insufficient resources ......................................................................
xua_rkm: Reply RKM RKEY REG with err insufficient resources
If a user tries to add more than 16 ASPs to an AS, it will fail internally. In that scenario, inform the peer.
Change-Id: I352dbc0a1319348b127e173599a1d967ef7bcb26 --- M src/xua_rkm.c 1 file changed, 6 insertions(+), 1 deletion(-)
Approvals: daniel: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve
diff --git a/src/xua_rkm.c b/src/xua_rkm.c index 1009d18..8817f49 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -309,7 +309,12 @@ }
/* Success: Add just-create AS to connected ASP + report success */ - ss7_as_add_asp(as, asp); + if (ss7_as_add_asp(as, asp) < 0) { + LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: Cannot associate ASP to AS %s\n", as->cfg.name); + msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0); + return -1; + } + msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_SUCCESS, rctx); /* append to list of newly assigned as */ if (!as_already_in_array)