aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2024-09-05Split REJect cause by CN DOMAINrhizomatica/testingKeith Whyte5-20/+59
Allow using a distinct Reject Cause for CS and PS Domain. This breaks any existing config that defines custom reject-cause TODO: Add Alias or Hidden function or whatever to handle old config.
2024-09-05Add the VLR to the subscribers last-seen vty commandKeith2-4/+10
It's useful to see WHERE the subcriber was last seen in a distributed GSM configuration Change-Id: I658e42c965a95b23675d4333d262522206fd24c4
2024-09-05Add a time limit to show subscribers last-seenKeith1-1/+1
There was a comment in gerrit I7f0573381a6d0d13841ac6d42d50f0e8389decf4 mentioning concern that the show subscriber commands I added had no limits I see now my mistake. Change-Id: I170e1025d534881281379efee0f5f8f51b88fc06
2024-09-05Make local attach max age VTY configurableKeith3-1/+17
Change-Id: I14d1e6489001529ac2c96ddbf41605c33b05283b
2024-09-05VTY: Add proxy inspection and deleteKeith1-0/+99
Change-Id: I5d990b1c765e2bfb762012f0924e68c2856804bc
2024-09-05Implement subscriber-create-on-demand fallbackKeith6-3/+54
If the mslookup client gets no response with the configured timeout, then go ahead and create a local subscriber if subscriber-create-on-demand is so configured. Change-Id: I3755baa393f6cc6b766abf90ba0f3a062e4c0f5f
2024-09-05DGSM: Add ignore-created-on-demand optionKeith7-5/+83
When a subscriber is create(d)-on-demand (assuming configuration does not grant CS/PS access by default), then the following will be true: * The subscriber will never have connected, and therefore have no vlr_number entry. * The msisdn length will be the length configured in create-on-demand. * The subscriber will have no CS/PS access. Let's use these three conditions to 'detect' subscribers than have beeen created on demand, and ignore them in both the case of an incoming mslookup, and a local GSUP request. Change-Id: I40d40467316c360bcbd50d50cb2e52a38e718eac
2024-09-05mslookup: Add a flag to not stop on receive age: zeroKeith3-3/+19
This allows using the DGSM system to search for duplicate IMSI entries across all HLRs Change-Id: Ic69d6bc9834099ba3a7f3b6f8334b5eac90f2897
2024-09-05D-GSM: Add a query type for authorized imsi.Keith4-1/+10
Adds the possibility to use the DGSM/mDNS system to search all HLRs for only IMSIs that have either CS or PS service Change-Id: I54c469d34c3cd1bfd9a72a6c751ae183606d75ec
2024-09-05DGSM: add option to respond only for authorized IMSIsKeith7-4/+68
Adds a vty configuration option to the mslookup server which instructs the server to only reposnd to gsup.hlr queries for IMSIs that are both known AND have either Circuit Switched or Packet Switched access enabled. This helps in the case of so-called 'evil twin' IMSI entries, where, possibly due to subscriber-create-on-demand, as a result of a Location Update at a time when the home HLR was not reachable, the local hlr has an entry for an IMSI that in reality belongs to another HLR. NOTE: Network-wide concurrent use of subscriber-create-on-demand and the mslookup client is not currently possible, as the mslookup client has no fallback option to create-on-demand. A future commit, however will implement this fallback, thereby completing support for D-GSM with create-on-demand. Change-Id: I2643d6c93289ec0835fa1c00e275d627914775bc
2024-08-22subscriber-create-on-demand: add mode for MSISDN=IMSIHEADmasterVadim Yanitskiy5-2/+20
In may be desirable for some users to assign deterministic MSISDNs when subscriber-create-on-demand is enabled. This can be achieved by assigning MSISDN=IMSI. This commit adds a new mode for that. Change-Id: I3470492f5e46de7246d9a74e80c37f80f455d851
2024-08-07subscriber-create-on-demand: rework configurationVadim Yanitskiy4-32/+68
This commit prepares for adding a new subscriber-create-on-demand mode (MSISDN=IMSI), which is implemented in a follow-up patch. * add an enumerated type for subscriber-create-on-demand mode; * store the related parameters in an anonymous structure. Change-Id: Ib553172655f83dad1ac0e0254615c8c207d79ca9
2024-07-24Bump version: 1.7.0.17-bae13 → 1.8.01.8.0Oliver Smith4-14/+46
Change-Id: I3b05d5ac5417f5c995e7057474adba72326ebf11
2024-07-03mslookup: don't ignore return value of write()Oliver Smith1-3/+12
Fix GCC 13.2.0 refuses to build this with -Werror: src/mslookup/osmo-mslookup-client.c: In function 'socket_client_respond_result': src/osmo-hlr/src/mslookup/osmo-mslookup-client.c:432:9: error: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Werror=unused-result] 432 | write(c->ofd.fd, response, strlen(response)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mslookup/osmo-mslookup-client.c: In function 'socket_accept': src/osmo-hlr/src/mslookup/osmo-mslookup-client.c:530:17: error: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Werror=unused-result] 530 | write(c->ofd.fd, CSV_HEADERS, strlen(CSV_HEADERS)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I4b2e5cabe5306a999197f7c98362d872a3739078
2024-06-05README.md: cosmetic: fix a typoVadim Yanitskiy1-1/+1
Change-Id: Idd4270a74c2a9921943606c1157343f4756b1643
2024-05-15debian/postinst: add checks, be verboseOliver Smith1-6/+14
Do not attempt to change permissions/ownership if the package gets upgraded from a version higher than the next release. Do not fail if the user deleted the config file. Be verbose when changing permissions. Related: OS#4107 Change-Id: I1bcbe414fd18101e4d875a16539deab7baf9cb5f
2024-05-08contrib: remove rpm spec fileOliver Smith3-211/+0
Related: https://osmocom.org/news/255 Related: OS#6446 Change-Id: Idd67d52ca736c4e145387ea8d4030f9cf4b9596d
2024-04-26.deb/.rpm: various fixes related to non-rootOliver Smith3-32/+25
* Explicitly chown /var/lib/osmocom to osmocom:osmocom, instead of relying on systemd to do it when the service starts up. This does not work with the systemd versions in debian 10 and almalinux 8. * deb: Use "useradd" instead of the interactive "adduser" perl script from Debian. This makes it consistent with how we do it in rpm, and avoids the dependency on "adduser". * deb: Remove support for the "dpkg-statoverride --list" logic. This seems to be a rather obscure feature to override permissions for certain files or directories. Let's rather remove this complexity to make the postinst script more maintainable and more similar to the rpm spec file. If users need this, they can achieve something similar by using their own Osmocom config file in a different path with different permissions. * deb: Consistently use tabs throughout postinst, instead of mixing tabs and spaces. Related: OS#4107 Change-Id: Ib20406dd253f5e8720552e92e9002e45591218fa
2024-04-24.deb/.rpm: add osmocom user during package installMax4-2/+55
Created osmocom user & group during package installation. Fix the configuration dir/files permission to match. Related: OS#4107 Tweaked-By: Oliver Smith <osmith@sysmocom.de> Change-Id: I625c993ab03dfe32976c651acca9c35c33a768e7
2024-03-23README.md: Add Forum and Issue Tracker sectionsHarald Welte1-0/+14
Change-Id: Ic88d30fc8952762565af6115c8bb7d67fa7d7866
2024-03-23README.md: Improve mark-down formattingHarald Welte1-11/+12
Change-Id: Ib608ec568572af672934d1e2960e1dabc3a2a45c
2024-03-23Add funding link to github mirrorHarald Welte1-0/+1
see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository Change-Id: I935ec923362fd8d3f03a8db8e93e033f86f0a5ac
2024-01-26build: include {README.md,git-version-gen} into the release tarballVadim Yanitskiy1-0/+2
Change-Id: I072b5899ac77326f619d351f17aa78490946f452
2023-12-17ctrl: add subscriber.by-*.imsi GET-able variableMychaela N. Falconia1-0/+15
There may be a need in various OsmoCNI-attached entities (for example, external SMSC implementations) to perform a mapping from known MSISDN to unknown IMSI, querying OsmoHLR subscriber db for it. Querying for subscriber.by-msisdn-*.imsi will be much more efficient (and easier on client-side implementors) than querying for subscriber.by-msisdn-*.info and fishing the IMSI out of the long multiline response, discarding all other irrelevant info. Related: OS#6312 Change-Id: Icea1a74d0c664047f46758ab4ad75508782f3d12
2023-12-01Use uniform log format for default config filesAndreas Eversberg2-3/+11
Related: OS#6272 Change-Id: I4319b688286845d2ffbd944e51e9cc2e5159563c
2023-09-21SMS over GSUP: handle READY-FOR-SM.req from MSCsMychaela N. Falconia3-0/+60
When an MS indicates that it is ready to receive MT SMS, the MSC will send us a READY-FOR-SM.req message. Handle it by sending copies of the same message to all connected SMSCs and returning OK result to the MS that indicates its ready status. Related: OS#6135 Change-Id: I731545a3a0d0804289e24a7769e13bfd3f645132
2023-09-21SMS over GSUP: implement forwarding of MT SMSMychaela N. Falconia3-0/+32
When an SMSC tries to deliver an SM to a subscriber, it will send us an MT-forwardSM.req GSUP message. We look up the subscriber by IMSI and see if they are attached to a VLR. If the subscriber is attached, we forward the message to the MSC/VLR, otherwise return an error to the SMSC. Related: OS#6135 Change-Id: Ib3551bf7839690606c677461758c5cfef5f0aa7b
2023-09-21SMS over GSUP: implement forwarding of MO SMSMychaela N. Falconia4-0/+96
MO-forwardSM.req messages are now forwarded to a connected SMSC based on the SMSC address (SM-RP-DA) in the MO SM and the vty-defined mapping from SMSC numeric addresses to IPA names. Related: OS#6135 Depends: Iea5c29909c5be80f81dbbc2873656ff5cf590a5d (libosmocore) Change-Id: Iaad4531922c41583d261c79f42561a1bdbe03521
2023-09-21SMS over GSUP: implement vty config of SMSC routingMychaela N. Falconia9-0/+312
At the user-visible level (advanced settings menus on phones, GSM 07.05 AT commands, SIM programming) each SMSC is identified by a numeric address that looks like a phone number, originally meant to be a Global Title. OsmoMSC passes these SMSC addresses through as-is to MO-forwardSM.req GSUP message - however, SMSCs that connect to OsmoHLR via GSUP identify themselves by their IPA names instead. Hence we need a mapping mechanism in OsmoHLR config. To accommodate different styles of network design ranging from strict recreation of classic GSM architecture to guest roaming arrangements, a two-level configuration is implemented, modeled after EUSE/USSD configuration: first one defines which SMSCs exist as entities, identified only by their IPA names, and then one defines which numeric SMSC address (in SM-RP-DA) should go to which configured SMSC, with the additional possibility of a default route. Related: OS#6135 Change-Id: I1624dcd9d22b4efca965ccdd1c74f0063a94a33c
2023-09-17hlr_vty.c: drop redundant include of hlr_ussd.hVadim Yanitskiy1-2/+0
Change-Id: Ia873c3ea7fb76cb83628811f159e9d5f2de8dcbd
2023-09-12Bump version: 1.6.0.20-37f0-dirty → 1.7.01.7.0Pau Espin Pedrol6-16/+49
Change-Id: I3f169ff8f9b10a4d4b5c50286951d326fa713245
2023-09-12Add support for multiple APN profiles for subscriber dataAlexander Couzens7-14/+311
Previously the HLR sent in the Insert Subscriber Data call only the wildcard APN as a single entry. This violates the spec because the first entry (with the lowest context_id) is always the default APN, but it is forbidden to have a wildcard APN as default apn. Introduce a default template/profile which can contain multiple APNs. This profile is always sent out to the SGSN/MME as part of Insert-Subscriber-Data. In the future a subscriber might have a profile template name written into the database which will resolve to a "pdp-profile premium" in the configuration. To be backward compatible, if the pdp-profile default section is missing, the HLR will send out only a wildcard APN. Config example: hlr ps pdp-profile default profile 1 apn internet profile 2 apn * Changes to the apn list will be only handed out to subscribers when the subscriber do a location update. Related: SYS#6391 Change-Id: I540132ee5dcfd09f4816e02e702927e1074ca50f
2023-08-29Add VTY support for TUAK algorithmHarald Welte3-9/+19
Change-Id: If2611658f7cb990b484d7429ab2f944f56fd2eb6 Depends: libosmocore.git Ib905b8d8bdf248e8299bf50666ee1bca8298433d
2023-08-29db: extend database schema to support 256bit K and/or OP[c] valuesHarald Welte7-31/+82
Other UMTS AKA algorithms than MILENAGE (notably TUAK) support K sizes of up to 256bit, or mandate a OP/OPc size of 256 bit. Let's extend our database schema to accommodate such larger sizes. Change-Id: Ibbde68484c904507a15c35cbfdf88cd47d0c7039
2023-07-21USSD: fix handling of ussd-DataCodingScheme != 0x0fVadim Yanitskiy1-2/+33
The usual Data Coding Scheme value in the mobile-originated USSD request (processUnstructuredSS-Request) is 0x0f, which means: 0000 .... = Coding Group: Coding Group 0 (Language using the GSM 7 bit default alphabet) .... 1111 = Language: unspecified However some modems are known to use a different default value, if not specified explicitly (AT+CUSD has optional DCS parameter): 0000 .... = Coding Group: Coding Group 0 (Language using the GSM 7 bit default alphabet) .... 0000 = Language: German (0) In function rx_proc_ss_req(), we should not be using req.ussd_text, because this field has been deprecated and may contain unexpected data. For example, in the abovementioned case it would contain the 7 bit encoded ussd-String 'aa510c061b01'O and osmo-hlr would indeed fail to find a matching route for a non-ASCII string. Instead of relaying on gsm0480_parse_facility_ie(), let's check the Data Coding Scheme value and decode the request string ourselves. Expect the Coding Group 0, but be more tolerant to the indicated language: print a warning and treat it as '1111'B (unspecified). Change-Id: Ib7bac660b1a7942adcfbe7b14f162c95061a25db Related: OS#6075
2023-07-05gsup_server: fix msgb memleak in osmo_gsup_server_read_cb()Vadim Yanitskiy1-4/+2
I noticed that inability to send IPA PONG in response to IPA PING from osmo-{msc,sgsn} results in an "IPA Multiplex" chunk being leaked. No matter what's returned from ipa_server_conn_ccm(), we need to free the msgb containing the incoming IPA message. Change-Id: I5c5acbffc2913f78db4894ae3633b5eca9c2e8d6
2023-07-05ussd: fix GSUP memleaks in rx_proc_ss_{req,error}()Vadim Yanitskiy1-1/+5
Also take a chance to use a more suitable error cause value. Change-Id: I22ba5ad470989b7e8ba8fe2be170eac4adcb48c5
2023-07-05lu_fsm: fix memleak in lu_fsm_wait_insert_data_result()Vadim Yanitskiy1-0/+1
Currently osmo-hlr leaks memory (msgb holding 1203 bytes of data and a struct osmo_gsup_req) on receipt of OSMO_GSUP_MSGT_INSERT_DATA_ERROR. Change-Id: I4c70a06169158c869360707a7a62436dbf13b9b3
2023-06-14src/db.c: Switch from "const char *statements" to "const char * const"Harald Welte2-8/+8
This is primarily to make the linter happy, which spews "static const char * array should probably be static const char * const" errors in gerrit when adding similar new code to this existing file. So let's first convert the old code and then add new code that makes the linter happy. I guess it does have a point, as both the individual string pointers as well as the array of the pointers are constant. Change-Id: I39e9fb6bd8052f4878cfc95061775bf940631ae5
2023-06-14Port to new libosmogsm 'struct osmo_sub_auth_data2'Harald Welte12-134/+168
libosmogsm has recently introdcued a 'struct osmo_sub_auth_data2' as successor to 'struct osmo_sub_auth_data', together with updated osmo_auth_gen_vec2/osmo_auth_gen_vec_auts2 API. The rationale of this new API is to enable * support for AKA algorithms which use K and/or OP[c] values of 256bit (instead of the classic 128bit) * support for RES length sizes of 4 and 16 bytes (instead of the classic 8 bytes) This commit just jumps over to the new API without adding any related functionality to osmo-hlr. The latter is left for subsequent commits. Change-Id: I3207c7bfb73e9ff5471e5c26b66639549e4d48a2 Depends: libosmocore.git Ie775fedba4a3fa12314c0f7c8a369662ef6a40df
2023-06-03cosmetic: gen_ts_55_205_test_sets/main_template tabs istead of spacesHarald Welte1-2/+2
Let's consistently use our normal tab indent style Change-Id: I4172b59131ac4166174c1860fcb07b7bee3df728
2023-06-03cosmetic: gen_ts_55_205_test_sets/func_template.c: Use tab-indentHarald Welte1-27/+27
This templates is used for generating C code, so it should use our normal tab-based code indenting. Change-Id: I0be7eb2d7b551d7eaaee15994ef37262694819f6
2023-05-30Introduce support for XOR-2G algorithmHarald Welte13-36/+43
So far we supported a "xor" algorithm in osmo-hlr, without specifying whether it's the XOR-3G or the (different) XOR-2G algorithm. Furthermore, it was buggy in the sense that it permitted the XOR[-3G] for 2G authentication data in the database. This patch * renames existing "xor" to "xor-3g" * disallows "xor-3g" usage with 2G authentication data * introduces support for XOR-2G as "xor-2g" in the VTY Change-Id: I039a1f84fda54a908a82fe621e7fd078cb85e4c6 Depends: libosmocore.git I0ee0565382c1e4515d44ff9b1752685c0a66ae39
2023-05-26systemd: depend on networking-online.targetOliver Smith1-0/+2
Related: SYS#6400 Change-Id: I29e547242b2ed1cfc4750c7d7e5f8636c2e8f3dc
2023-05-10hlr: use talloc for memory allocation in ↵Alexander Couzens4-28/+13
osmo_gsup_create_insert_subscriber_data_msg Don't use static buffers for APN and MSISDN. When encoding multiple APNs the static buffer might be too small. In prepration to support multiple APNs in subscriber data Change-Id: I00b5c2dfadcf6e0740e93b4c3292d2654d22e80c
2023-04-25debian: set compat level to 10Oliver Smith2-2/+2
Related: OS#5958 Change-Id: I5d26ab03aacf3b8ef8c1c4c669c12090fd0b7899
2023-03-14tests/*/Makefile.am: move -I to AM_CPPFLAGSVadim Yanitskiy4-4/+7
Change-Id: I654053e11b0cc824c198f68e4ff0a0fcb295efb0
2023-03-14tests/auc/Makefile.am: put object files to LDADDVadim Yanitskiy1-4/+4
Change-Id: Iaefcfe7a8904841a29094fe40eb5850912544b4c
2023-03-14mslookup: Call osmo_fd_unregister() before closing and changing bfd->fdPau Espin Pedrol1-2/+2
Change-Id: I26bba0dd092ad5fd6b4959b173fae93b542a93f1
2023-02-22tests/db/db_test.err: adjust to XOR-3G renameOliver Smith3-4/+4
Adjust the test to the related libosmocore change. Related: libosmocore I446e54d0ddf4a18c46ee022b1249af73552e3ce1 Change-Id: I68878d24340659f888e5e348b937161cffbd54e2