Commit Graph

52 Commits

Author SHA1 Message Date
Alexander Couzens e9c2b1ddaa osmo_dia2gsup: add config option diameter_connect_timer
The diameter_connect_timer can be set to reduce the ttcn3 timing.
Otherwise every test case would need to wait for at least one connect timer period to
succeed.

Related: OS#5657
Change-Id: I669a76022d866824e7b4e9f30dd7e51aa714ae7d
2023-11-11 19:18:52 +01:00
Alexander Couzens 96eb0938db osmo_dia2gsup: set Origin-State-Id
To allow the remote side to detect restarts.
See RFC6733.

Related: OS#6155
Change-Id: I3693bad6030d41db4e28bd5f343c5db912789344
2023-11-11 19:18:50 +01:00
Alexander Couzens cdd84e4a5a rebar3: define a release
Further with the release, rebar3 will also start the application
when calling `rebar3 shell`.

Change-Id: I76cb16e28b5bc6fb231566be1bd7905235fdf56b
2023-11-10 13:19:20 +01:00
Alexander Couzens be945307eb gsup: implement a (re-)connect the GSUP link if it fails
Change-Id: Id531d202ded123786d7a41dd0d7c3695af59fc2d
2023-11-10 13:19:20 +01:00
Oliver Smith ed3991574a Bump version: 0.2.0
Change-Id: I3a175b0c7585268d748b007ab89110987b7e04cf
2023-10-31 13:00:53 +01:00
Oliver Smith 3c8e580ce6 debian/rules: extract build_dep.tar.gz first
Currently dh_auto_build is a no-op, but move extracting depends up in
case we add a Makefile here too.

Related: osmo-epdg I2bb0b5f608cd5d9a24c2a367425c524447bd002c
Change-Id: Ib64671a8b4629dde1e21b18a6405f7ae7d87a46f
2023-10-06 14:30:40 +02:00
Alexander Couzens b8aef30a14 gsup: convert all unknown causes into diameter UNABLE_TO_COMPLY
Change-Id: I7f19bf1fb3676a1302f0d6d7d7450a3f201ba5bb
2023-09-02 17:44:23 +02:00
Alexander Couzens 6ba22c2dbd server_cb: use a define for the VENDOR_3GPP code
Also use a proper variable name

Change-Id: I9bd99998963624f7688b972cbb3908fae5686231
2023-09-02 17:41:27 +02:00
Pau Espin b524e24dec Translate GSUP Auth Info Answer error Cause in Diamater AIA
Change-Id: I32622713c2c1f40e1d9c5597ffab8cb211171fc2
2023-09-02 17:41:10 +02:00
Pau Espin 5e11d28cd6 Add GMM error cause present in osmo-hlr's gsm48_gmm_cause_vty_names
Change-Id: I77336cb2c76a516ecea5b46500da91fd4230176d
2023-08-30 20:50:40 +02:00
Pau Espin 3ae6192d13 gsup: Attempt reconnecting if connect fails
Related: OS#5657
Change-Id: I47b6db0f0267bbd4c80fbac9d51a8647862827a0
2023-08-28 15:39:18 +00:00
Pau Espin 1433617db7 gsup: Log connect failures
Change-Id: I273d37aa75cfacbc7c3302d035c2391d9bdd9b2e
2023-08-28 15:39:18 +00:00
Pau Espin 89ac8713e5 cosmetic: Fix typo in comment
Change-Id: I1f6a47aa8eb59224f4259969707f7e41d3c56a18
2023-08-25 14:09:00 +00:00
Oliver Smith ab4e541e01 README.md: update
Fix the broken formatting (wrong headlines, missing line breaks in
blocks of commands) and move the configuration and escript sections
below the running section.

Add the command that fixeria suggested for running it with one shell
command.

Old: https://gitea.osmocom.org/erlang/osmo_dia2gsup/src/branch/master/README.md
New: https://gitea.osmocom.org/osmith/osmo_dia2gsup/src/branch/master/README.md

Change-Id: Ib96f42ca0066ba2f6d0d783f6bf1764cbfee544f
2023-08-24 17:07:47 +02:00
Pau Espin 9d032c350c README.md: Document how to run escript with config file
Change-Id: Icc78f4bd22608ad0c8a2c5f6095cd77543ab2048
2023-08-24 16:49:03 +02:00
Pau Espin f8258efa3f rebar3.lock: Update epcap dep to v1.1.1 to fix compilation error
Fixes compilation error at build time:
"""
/git/erlang/osmo_dia2gsup/_build/default/lib/epcap/c_src/epcap.c:31:10: fatal error: ei.h: No such file or directory
"""

Related: OS#6141
Change-Id: I033f0e8882cb64c596c6f2802a1f90b3cfeed621
2023-08-23 16:48:50 +02:00
Alexander Couzens 7c912ff07b Use GSUP APN as Service-Selection field
Previous the osmo-hlr always sent a wildcard APN as the only APN
which violates the spec. Further wildcard APNs aren't support
by the current Open5gs.
Since I540132ee5dcfd09f4816e02e702927e1074ca50f the osmo-hlr
supports multiple APN in the subscriber data.

Related: SYS#6391
Change-Id: I2a0af5d785ce62968f6e3952602d92cb4f37e4ab
2023-06-11 19:27:57 +00:00
Oliver Smith d7e225b098 systemd: depend on networking-online.target
Related: SYS#6400
Change-Id: I9c0cc0779f9ddb7520a565668b7cde07c6ad55d8
2023-05-26 14:10:44 +02:00
Oliver Smith 2f173b712e debian: set compat level to 10
Related: OS#5958
Change-Id: I49fcc4fe9d3e795f8c3514d35ff3e2beca2917d1
2023-04-25 16:48:34 +02:00
Alexander Couzens 1b6291e313 docs: add a simple example to use configuration file
Change-Id: I013f03779508bc3ee5bb378c357a5c94b40b74a0
2023-03-22 13:23:02 +00:00
Alexander Couzens b88b1564fc contrib/generate_build_dep.sh: remove erlang bytecode from checkouts
The checkout directory should only contains source and no erlang bytecode.
Otherwise it might not compile when creating the build_dep.tar.gz on a machine
with newer erlang and try to build the package on a system with older erlang.

Change-Id: I101119392c6d0fad264c2551fded10288c87da5e
2022-08-30 12:54:20 +00:00
Daniel Willmann 742f8d5b0f Release new version: 0.1.2
Fixes: OS#5646
Change-Id: I2b71212009149ea46effecb08d96620cc67c944b
2022-08-19 17:45:45 +02:00
Matt Johnson 9e0bd808bf server_cb: Improve handling resynchronization info
This commit improves handling of the resynchronization information in
a DIAMETER request from a UE that has a sync failure. It factors
parsing of the resync info into a helper function with a defined spec,
and handles the resynchronization info as a binary rather than a
string.

Change-Id: I2aad313d4d37d07040bc5344de3a023d34fd8ded
2022-08-19 15:20:38 +00:00
Oliver Smith 6e28afb504 Bump version: 0.1.1
Change-Id: I30c104822a96d14f80cad320b801149f38b886b7
2022-07-22 12:52:24 +02:00
Alexander Couzens c243463bf7 debian: add generate_build_dep.sh to vendor erlang dependencies
To build on OBS the source package must include all dependencies.
Downloading dependencies isn't allowed. generate_build_dep.sh will
download all dependencies.
The jenkins job to update OBS should do this before calling
`dpkg-buildpackage -S` to build a source package.

Related: SYS#6006
Change-Id: I22041887fd1b72ea328605d18801d412b86bfc9c
2022-07-20 19:51:00 +00:00
Alexander Couzens 700979a5b1 debian: rework packaging
- use the rebar3' debian/rules as template
- use override targets instead of the exact targets
- only install the escriptize osmo_dia2gsup file

Related: SYS#6006
Change-Id: I40add168875de87ef0cc62deeb5377d2ce080e45
2022-07-20 19:51:00 +00:00
Alexander Couzens a9faa72537 debian: add missing Build-Depends debhelper
Related: SYS#6006
Change-Id: I1b5774983d705c54c909823da329068a7aa0a9a8
2022-07-20 19:51:00 +00:00
Alexander Couzens 1c4347432d add rebar.lock to define known working dependencies
The rebar.lock contains the last known working state
of all dependencies with exact version numbers.
rebar.config only holds the minimal dependencies (package x version >=2.0.0)

Related: SYS#6006
Change-Id: I40660b23cee04ef2b4afbca34522a42a4b057e2e
2022-07-20 19:51:00 +00:00
Daniel Willmann 9ff2e8452b diameter: Change default bind IP to 127.0.0.8
The IP 127.0.0.4 is already used by the open5gs smf. Since the mme by default
tries to connect to the hss at 127.0.0.8 let's change the default here
to something that works ootb.

Change-Id: Ibe36e86e6473caab753308837b2ced0f1b53e1f2
2022-07-20 17:49:58 +02:00
Oliver Smith 173095f9fa debian: add packaging
Add initial debian packaging and a systemd service that starts
osmo_dia2gsup. Given that dependencies listed in rebar.lock are not
packaged in debian 11, this just uses rebar3 to download and compile
the dependencies during the build.

Resulting erlang files are installed to the following path, where they
become available in the erlang shell (erl):
  /lib/erlang/lib/{name_of_component}/ebin/

Related: SYS#6006
Change-Id: Ic55bca1260f992d0ed8583e7c7fe948ba0160d4d
2022-07-15 15:08:51 +02:00
Harald Welte 9491cf41d0 Add osmo_ss7 and osmo_gsup as dependencies to .app.src file
We are depending on those applications, so they should be listed.

Change-Id: I4a19439dff362f24efc108ee7b0790b143692d2f
2022-07-12 17:42:55 +02:00
Harald Welte f1ba878b15 rebar.config: Switch from git://git.osmocom.org to https://gitea
The old git URLs are still kept for compatibility, but we should
use the official git repository (now in gitea).

Change-Id: If9b70c42753e17f957241fe9be514163aee9e22d
2022-07-12 17:42:55 +02:00
Daniel Willmann f24be49fc4 Add main/1 so rebar2 escriptize works
Change-Id: Ifc3a58d09fbf5b9f36595515f47223a45ef13ba1
2022-07-12 17:42:55 +02:00
Daniel Willmann 592cc8bc19 server_cb: Fix issue with Erlang/OTP 24
Erlang/OTP 24 dropped crypto:hmac, so use crpyto:mac(hmac, ...) instead.

See https://github.com/riverrun/one_time_pass_ecto/issues/9

Change-Id: I7d916eb1f1435b3ac3fc362bb2f4daa7bbb8bb1a
2022-04-23 14:53:10 +02:00
Pau Espin bf59e9dc7e Add README.md file
Change-Id: I65ebd735d3c99c47b8f1a88c5a7eb272635d52c3
2022-02-18 12:43:52 +01:00
Pau Espin e88dc911a9 .gitignore: Add several more files and directories
Change-Id: Ib5ec638be322b59c8390aae61425f069d2e528f8
2022-02-18 12:43:47 +01:00
Alexander Couzens ee090f4773 switch back to use the master branch of osmo_ss7
Add the missing ipa_ccm_options record to use the new api

Change-Id: I89ff055ed84e394d0f25bc6389d1f4d757f7b92b
2022-02-15 19:24:50 +01:00
Harald Welte a560adee95 upgrade to lager 3.9.1 (fix builds with Erlang/OTP 24)
Change-Id: I704855533caf00046aa046d2ac9358adeadbca31
2022-02-15 19:24:50 +01:00
Alexander Couzens c57f8cc0b9 add .gitreview configuration
Change-Id: I2bf183f46ca1cb62be982ddc32bd249bfdf1ca86
2021-12-30 20:47:24 +01:00
Oliver Smith 47d080fa01 contrib/jenkins.sh: new file
Related: OS#4345
Change-Id: I688b71271fe80b4ec05304e9ed8abc8707cb7b58
2020-01-17 09:01:18 +01:00
Harald Welte 388d387dcc Send supported and current RAT type in GSUP to OsmoHLR
Particularly the CURRENT_RAT_TYPE is what tells OsmoHLR to provide
tuples with AMF separation bit for EUTRAN, and not foe GERAN/UTRAN.
2019-12-01 17:03:15 +01:00
Harald Welte 6f5290846f cosmetic: fix copy+paste mistake in comment 2019-08-21 14:54:27 +02:00
Harald Welte 332fe7ff8b Implement UMTS AKA re-sync support (untested) 2019-08-20 22:36:50 +02:00
Harald Welte e795af37f8 tolerate GSUP disconnects 2019-08-20 21:07:10 +02:00
Harald Welte 299ba939ab first working version translating both AIR/AIA and ULR/ULA 2019-08-15 18:31:12 +02:00
Harald Welte 51f47c0f56 add missing gsup_client.erl 2019-08-14 13:30:49 +02:00
Harald Welte 44da7d743f WIP 2019-08-14 13:28:08 +02:00
Harald Welte 49248de1f9 try to resolve duplicates btween 29.229 and 29.329
The travelping diameter files appear to define a number of AVPs
originating in 29.229 in the 29.329 .dia file, let's try to
resolve this and avoid diameteerc complaining about AVPs being
defined in two locations.
2019-08-10 22:58:39 +02:00
Harald Welte 61276c4170 fixup 2019-08-10 22:58:39 +02:00
Harald Welte d19e33fd5e import 3GPP DIAMETER related definitions from travelping/erggw_aaa
There are some dependencies of TS 29.272 which we can inherit from
https://github.com/travelping/ergw_aaa

The version used was from git commit a5d5a93e2ef87f4168c676ee9a6d8300beb729d8
2019-08-10 22:09:19 +02:00