Compare commits

..

4 Commits

Author SHA1 Message Date
Pau Espin 7bf413c2a0 WIP: trigger encode error
Run in erlang shell:
ip link del gtp0; rebar3 shell --config ./config/local.config

Then do:
eunit:test(aaa_diameter_s6b,[verbose]).

Change-Id: I9f83ec2c4b8e09d2e01000bfa695c41129021cb7
2024-03-13 21:21:04 +01:00
Pau Espin ff57ae27ff Implement RTR Deregistration-Reason PERMANENT_TERMINATION
Change-Id: I57f2e02dc4034b63c118e4a4139b2830e38a2138
2024-03-13 20:21:59 +01:00
Pau Espin 859807eb7f rebar.config: Update required OTP version 25.2.3
Since anyway we need debian12 for other reasons, like newer kernel, then
also require OTP from debian12 which is the one being tested and we want
to support. At the moment, debian12 OTP package version is 25.2.3.
I am personally building with Archlinux's package version 26.2.2.

Change-Id: I0ac7c93adbe88e1b738f1319cf1280c119ed59d1
2024-03-13 20:20:39 +01:00
Pau Espin 0d09d1e568 jenkins.sh: use available Makefile, clean before building
The project needs to go through clean procedure to clean up the
generated diameter files, so that they are generated from newer dia
files again.

Change-Id: Id3f2d71c184cf387fa178d5138d401686a8d0a63
2024-03-13 20:12:55 +01:00
3 changed files with 19 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh -ex
rebar3 compile
rebar3 escriptize
rebar3 eunit
make clean || true
make
make check

View File

@ -10,7 +10,7 @@
{osmo_gsup, {git, "https://gerrit.osmocom.org/erlang/osmo_gsup", {branch, "osmocom/epdg"}}}
]}.
{minimum_otp_vsn, "20.3"}.
{minimum_otp_vsn, "25.2.3"}.
{plugins, [
{rebar3_diameter_compiler,
{git, "https://github.com/carlosedp/rebar3_diameter_compiler.git", {tag, "0.8.0"}}}

View File

@ -40,6 +40,7 @@
-behaviour(gen_server).
-include_lib("eunit/include/eunit.hrl").
-include_lib("diameter/include/diameter_gen_base_rfc6733.hrl").
-include_lib("diameter_3gpp_ts29_273_s6b.hrl").
@ -221,3 +222,17 @@ diameter_call(Msg, State) ->
diameter:call(?SVC_NAME, ?APP_ALIAS, Msg, [{timeout, State#s6b_state.tx_timeout},
detach]).
%% TESTING:
reverse_test() ->
State = #s6b_state{tx_timeout = 10000},
Imsi = "262422638508077",
SessionId = diameter:session_id(application:get_env(?ENV_APP_NAME, dia_s6b_origin_host, ?ENV_DEFAULT_ORIG_HOST)),
ASR = #'ASR'{'Session-Id' = SessionId,
'Auth-Application-Id' = ?DIAMETER_APP_ID_S6b,
'User-Name' = Imsi,
'Auth-Session-State' = ?'AUTH-SESSION-STATE_NO_STATE_MAINTAINED'
},
lager:debug("S6b Tx ASR: ~p~n", [ASR]),
Ret = diameter_call(ASR, State),
ok = Ret.