osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27728 )
Change subject: bsc_nat_fsm: check for error from get_next_id_ran ......................................................................
bsc_nat_fsm: check for error from get_next_id_ran
Related: SYS#5560 Change-Id: Ic55ba119e9c736c396f06a58ec9bc1f4682e9b11 --- M src/osmo-bsc-nat/bsc_nat_fsm.c 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/28/27728/1
diff --git a/src/osmo-bsc-nat/bsc_nat_fsm.c b/src/osmo-bsc-nat/bsc_nat_fsm.c index 2a32c9d..d7f8aa3 100644 --- a/src/osmo-bsc-nat/bsc_nat_fsm.c +++ b/src/osmo-bsc-nat/bsc_nat_fsm.c @@ -200,7 +200,12 @@ goto error; }
- subscr_conn = subscr_conn_alloc(msc, bsc, subscr_conn_get_next_id_ran(), prim->u.connect.conn_id); + rc = subscr_conn_get_next_id_ran(); + if (rc < 0) { + LOGP(DMAIN, LOGL_ERROR, "Failed to get next_id_ran\n"); + goto error; + } + subscr_conn = subscr_conn_alloc(msc, bsc, rc, prim->u.connect.conn_id);
LOGP(DMAIN, LOGL_DEBUG, "Fwd via %s\n", talloc_get_name(subscr_conn));