diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-06-24 11:29:55 +0200 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-07-06 06:50:23 +0700 |
commit | 35d23428502d205dd2876ad12941c7fd4160b099 (patch) | |
tree | c83ddb0b3500cd1dcf1eaeb3b2e3f19491222a17 | |
parent | 6b274b95fc357d9007b77a87d862dace60409a32 (diff) |
Store identity of VLR/SGSN in UpdateLocation
The HLR must store the least-recently used VLR and SGSN identities in
its database to ensure subsequent mobile-terminated transactions can
be routed accordingly.
Change-Id: Ib2611421f3638eadc361787af801fffe9a34bd8a
Closes: OS#2796
-rw-r--r-- | src/hlr.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -296,10 +296,19 @@ static int rx_upd_loc_req(struct osmo_gsup_conn *conn, } else #endif { + int rc; + uint8_t *addr; + rc = osmo_gsup_conn_ccm_get(conn, &addr, IPAC_IDTAG_SERNR); + if (rc <= 0) { + osmo_strlcpy(luop->subscr.imsi, gsup->imsi, sizeof(luop->subscr.imsi)); + lu_op_tx_error(luop, GMM_CAUSE_NET_FAIL); + return 0; + } /* TODO: Subscriber allowed to roam in PLMN? */ /* TODO: Update RoutingInfo */ /* TODO: Reset Flag MS Purged (cs/ps) */ /* TODO: Control_Tracing_HLR / Control_Tracing_HLR_with_SGSN */ + db_subscr_lu(g_hlr->dbc, luop->subscr.id, (char *)addr, luop->is_ps); lu_op_tx_insert_subscr_data(luop); } return 0; |