pespin has uploaded this change for review. ( 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, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/74/40574/1
diff --git a/src/xua_rkm.c b/src/xua_rkm.c index 1009d18..19cd6a1 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -309,7 +309,11 @@ }
/* Success: Add just-create AS to connected ASP + report success */ - ss7_as_add_asp(as, asp); + if (ss7_as_add_asp(as, asp) < 0) { + 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)