lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

October 2023

  • 1 participants
  • 1843 discussions
[M] Change in osmo-ttcn3-hacks[master]: hss: Test Operator-Determined-Barring feature
by pespin 15 Oct '23

15 Oct '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34718?usp=email ) Change subject: hss: Test Operator-Determined-Barring feature ...................................................................... hss: Test Operator-Determined-Barring feature Related: SYS#6588 Change-Id: I8deea9e284447f8991bdeced982c14fae2f211c5 --- M hss/HSS_Tests.ttcn M library/DIAMETER_Templates.ttcn 2 files changed, 72 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/hss/HSS_Tests.ttcn b/hss/HSS_Tests.ttcn index 88a82a4..bd493c4 100644 --- a/hss/HSS_Tests.ttcn +++ b/hss/HSS_Tests.ttcn @@ -22,7 +22,8 @@ charstring mp_diam_dest_host := "hss.localdomain"; SubscriberConfigs subscribers := { /* Existing subscriber, ULA returns SERVICE_GRANTED */ - '001010000000000'H + '001010000000000'H, + '001010000000001'H }; } @@ -183,9 +184,8 @@ } /* ULR + ULA against HSS */ -private function f_dia_ulr_ula() runs on Cli_Session_CT { +private function f_dia_ulr_ula(template (present) AVP_list ula_sub_data) runs on Cli_Session_CT { var octetstring sess_id := char2oct("foobar"); - var template (present) AVP_list sub_data; var PDU_DIAMETER rx_dia; var UINT32 hbh_id := int2oct(g_pars.s6a_next_hbh_id, 4); var UINT32 ete_id := int2oct(g_pars.s6a_next_ete_id, 4); @@ -202,19 +202,8 @@ g_pars.s6a_next_hbh_id := g_pars.s6a_next_hbh_id + 1; g_pars.s6a_next_ete_id := g_pars.s6a_next_ete_id + 1; - sub_data := superset( - tr_AVP_3GPP_SubscriberStatus(SERVICE_GRANTED), - tr_AVP_3GPP_SubscrRauTauTmr(?), - tr_AVP_3GPP_AMBR(?, ?), - tr_AVP_3GPP_ApnConfigProfile(superset( - tr_AVP_3GPP_ContextId(?), - tr_AVP_3GPP_AllApnConfigsIncl, - tr_AVP_3GPP_ApnConfig(?, ?, ?) - )) - ); - alt { - [] S6a.receive(tr_DIA_ULA(sub_data, sess_id, ?, ?, hbh_id, ete_id)) -> value rx_dia { + [] S6a.receive(tr_DIA_ULA(ula_sub_data, sess_id, ?, ?, hbh_id, ete_id)) -> value rx_dia { setverdict(pass); } [] S6a.receive(PDU_DIAMETER:?) -> value rx_dia { @@ -226,7 +215,18 @@ /* create a session, expect it to succeed */ private function f_TC_ulr_ula() runs on Cli_Session_CT { - f_dia_ulr_ula(); + var template (present) AVP_list sub_data := superset( + tr_AVP_3GPP_SubscriberStatus(SERVICE_GRANTED), + tr_AVP_3GPP_SubscrRauTauTmr(?), + tr_AVP_3GPP_AMBR(?, ?), + tr_AVP_3GPP_ApnConfigProfile(superset( + tr_AVP_3GPP_ContextId(?), + tr_AVP_3GPP_AllApnConfigsIncl, + tr_AVP_3GPP_ApnConfig(?, ?, ?) + )) + ); + + f_dia_ulr_ula(sub_data); setverdict(pass); } testcase TC_ulr_ula() runs on MTC_CT { @@ -237,9 +237,37 @@ vc_conn.done; } +/* Same as TC_ulr_ula, but done on a subscriber configured with +Subscriber-Status=1 (OPERATOR_DETERMINED_BARRING) and +Operator-Determined-Barring=7. */ +private function f_TC_ulr_ula_subscr_op_det_barring_7() runs on Cli_Session_CT { + var template (present) AVP_list sub_data := superset( + tr_AVP_3GPP_SubscriberStatus(OPERATOR_DETERMINED_BARRING), + tr_AVP_3GPP_OperatorDeterminedBarring(7), + tr_AVP_3GPP_SubscrRauTauTmr(?), + tr_AVP_3GPP_AMBR(?, ?), + tr_AVP_3GPP_ApnConfigProfile(superset( + tr_AVP_3GPP_ContextId(?), + tr_AVP_3GPP_AllApnConfigsIncl, + tr_AVP_3GPP_ApnConfig(?, ?, ?) + )) + ); + + f_dia_ulr_ula(sub_data); + setverdict(pass); +} +testcase TC_ulr_ula_subscr_op_det_barring_7() runs on MTC_CT { + var Cli_Session_CT vc_conn; + var SessionPars pars := valueof(t_SessionPars(subscribers[1])); + f_init(); + vc_conn := f_start_handler(refers(f_TC_ulr_ula_subscr_op_det_barring_7), pars); + vc_conn.done; +} + control { execute( TC_ulr_ula() ); + execute( TC_ulr_ula_subscr_op_det_barring_7() ); } diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 5bbb2c3..4dd686a 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -887,6 +887,24 @@ } } +/* Ts 29.272 7.3.30 Operator-Determined-Barring */ +template (present) GenericAVP tr_AVP_3GPP_OperatorDeterminedBarring(template (present) uint32_t val := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Operator_Determined_Barring), + avp_data := { + avp_AAA_3GPP_Operator_Determined_Barring := int2oct_tmpl(val, 4) + } + } +} +template (value) GenericAVP ts_AVP_3GPP_OperatorDeterminedBarring(uint32_t val) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Operator_Determined_Barring), + avp_data := { + avp_AAA_3GPP_Operator_Determined_Barring := int2oct(val, 4) + } + } +} + template (present) GenericAVP tr_AVP_3GPP_SubscrRauTauTmr(template (present) uint32_t tmr := ?) := { avp := { avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer), -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34718?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8deea9e284447f8991bdeced982c14fae2f211c5 Gerrit-Change-Number: 34718 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: Introduce HSS_Tests testsuite
by pespin 15 Oct '23

15 Oct '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34714?usp=email ) Change subject: Introduce HSS_Tests testsuite ...................................................................... Introduce HSS_Tests testsuite Change-Id: Ic2fccd9c54aea04f1a31649a0af47c974939fb2f Related: SYS#6588 --- M Makefile A hss/HSS_Tests.cfg A hss/HSS_Tests.default A hss/HSS_Tests.ttcn A hss/expected-results.xml A hss/gen_links.sh A hss/regen_makefile.sh 7 files changed, 335 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/Makefile b/Makefile index 1d119d1..0ed632f 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ hlr \ hnbgw \ hnodeb \ + hss \ mgw \ mme \ msc \ diff --git a/hss/HSS_Tests.cfg b/hss/HSS_Tests.cfg new file mode 100644 index 0000000..24fe9c4 --- /dev/null +++ b/hss/HSS_Tests.cfg @@ -0,0 +1,18 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./HSS_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] +HSS_Tests.control diff --git a/hss/HSS_Tests.default b/hss/HSS_Tests.default new file mode 100644 index 0000000..4c0b502 --- /dev/null +++ b/hss/HSS_Tests.default @@ -0,0 +1,7 @@ +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[EXECUTE] diff --git a/hss/HSS_Tests.ttcn b/hss/HSS_Tests.ttcn new file mode 100644 index 0000000..88a82a4 --- /dev/null +++ b/hss/HSS_Tests.ttcn @@ -0,0 +1,246 @@ +module HSS_Tests { + +import from General_Types all; +import from Osmocom_Types all; +import from Native_Functions all; +import from Misc_Helpers all; + +import from DIAMETER_Types all; +import from DIAMETER_Templates all; +import from DIAMETER_Emulation all; + +type record of hexstring SubscriberConfigs; + +modulepar { + charstring mp_hss_hostname := "127.0.0.4"; + integer mp_hss_port := 3868; + charstring mp_diam_local_hostname := "127.0.0.1"; + integer mp_diam_local_port := 3868; + charstring mp_diam_orig_realm := "localdomain"; + charstring mp_diam_orig_host := "mme.localdomain"; + charstring mp_diam_dest_realm := "localdomain"; + charstring mp_diam_dest_host := "hss.localdomain"; + SubscriberConfigs subscribers := { + /* Existing subscriber, ULA returns SERVICE_GRANTED */ + '001010000000000'H + }; +} + +/* main component, we typically have one per testcase */ +type component MTC_CT { + + /* emulated MME/SGSN */ + var DIAMETER_Emulation_CT vc_S6a; + port DIAMETER_PT S6a_UNIT; + port DIAMETEREM_PROC_PT S6a_PROC; + /* global test case guard timer (actual timeout value is set in f_init()) */ + timer T_guard; +} + +/* global altstep for global guard timer; */ +altstep as_Tguard() runs on MTC_CT { + [] T_guard.timeout { + setverdict(fail, "Timeout of T_guard"); + mtc.stop; + } +} + +type component DIAMETER_ConnHdlr_CT extends DIAMETER_ConnHdlr { + port DIAMETER_Conn_PT DIAMETER_CLIENT; + port DIAMETEREM_PROC_PT DIAMETER_PROC_CLIENT; +} + +function f_diam_connhldr_ct_main(hexstring imsi) runs on DIAMETER_ConnHdlr_CT { + var DIAMETER_ConnHdlr vc_conn_unused; + var PDU_DIAMETER msg; + var UINT32 ete_id; + + f_diameter_expect_imsi(imsi); + + while (true) { + alt { + [] DIAMETER_CLIENT.receive(PDU_DIAMETER:?) -> value msg { + DIAMETER.send(msg); + } + [] DIAMETER.receive(PDU_DIAMETER:?) -> value msg { + DIAMETER_CLIENT.send(msg); + } + [] DIAMETER_PROC_CLIENT.getcall(DIAMETEREM_register_eteid:{?,?}) -> param(ete_id, vc_conn_unused) { + DIAMETER_PROC.call(DIAMETEREM_register_eteid:{ete_id, self}) { + [] DIAMETER_PROC.getreply(DIAMETEREM_register_eteid:{?,?}) {}; + } + DIAMETER_PROC_CLIENT.reply(DIAMETEREM_register_eteid:{ete_id, vc_conn_unused}); + } + } + } +} + +/* per-session component; we typically have 1..N per testcase */ +type component Cli_Session_CT { + var SessionPars g_pars; + + port DIAMETER_Conn_PT S6a; + port DIAMETEREM_PROC_PT S6a_PROC; +} +function f_diam_connhldr_expect_eteid(UINT32 ete_id) runs on Cli_Session_CT { + S6a_PROC.call(DIAMETEREM_register_eteid:{ete_id, null}) { + [] S6a_PROC.getreply(DIAMETEREM_register_eteid:{?,?}) {}; + } +} + +/* configuration data for a given Session */ +type record SessionPars { + hexstring imsi, + uint32_t s6a_next_hbh_id, + uint32_t s6a_next_ete_id +} + +template (value) SessionPars +t_SessionPars(hexstring imsi, uint32_t s6a_next_hbh_id := 1000, uint32_t s6a_next_ete_id := 22220) := { + imsi := imsi, + s6a_next_hbh_id := s6a_next_hbh_id, + s6a_next_ete_id := s6a_next_ete_id +} + +type function void_fn() runs on Cli_Session_CT; + +friend function DiameterForwardUnitdataCallback(PDU_DIAMETER msg) +runs on DIAMETER_Emulation_CT return template PDU_DIAMETER { + DIAMETER_UNIT.send(msg); + return omit; +} + +friend function f_init_diameter(charstring id) runs on MTC_CT { + var DIAMETEROps ops := { + create_cb := refers(DIAMETER_Emulation.ExpectedCreateCallback), + unitdata_cb := refers(DiameterForwardUnitdataCallback), + raw := false /* handler mode (IMSI based routing) */ + }; + var DIAMETER_conn_parameters pars; + + /* S6a setup: */ + pars := { + remote_ip := mp_hss_hostname, + remote_sctp_port := mp_hss_port, + local_ip := mp_diam_local_hostname, + local_sctp_port := mp_diam_local_port, + origin_host := mp_diam_orig_host, + origin_realm := mp_diam_orig_realm, + auth_app_id := omit, + vendor_app_id := c_DIAMETER_3GPP_S6_AID + }; + vc_S6a := DIAMETER_Emulation_CT.create(id); + map(vc_S6a:DIAMETER, system:DIAMETER_CODEC_PT); + connect(vc_S6a:DIAMETER_UNIT, self:S6a_UNIT); + connect(vc_S6a:DIAMETER_PROC, self:S6a_PROC); + vc_S6a.start(DIAMETER_Emulation.main(ops, pars, id)); + + f_diameter_wait_capability(S6a_UNIT); + /* Give some time for our emulation to get out of SUSPECT list of SUT (3 watchdong ping-pongs): + * RFC6733 sec 5.1 + * RFC3539 sec 3.4.1 [5] + * https://github.com/freeDiameter/freeDiameter/blob/master/libfdcore/p_psm.c#… + */ + f_sleep(1.0); +} + +private function f_init(float guard_timeout := 60.0) runs on MTC_CT { + T_guard.start(guard_timeout); + activate(as_Tguard()); + f_init_diameter(testcasename()); +} + +function f_start_handler(void_fn fn, template (omit) SessionPars pars_tmpl := omit) +runs on MTC_CT return Cli_Session_CT { + var charstring id := testcasename(); + var DIAMETER_ConnHdlr_CT vc_conn_s6a; + var Cli_Session_CT vc_conn; + var SessionPars pars; + + if (isvalue(pars_tmpl)) { + pars := valueof(pars_tmpl); + } else { + /*TODO: set default values */ + } + + vc_conn := Cli_Session_CT.create(id); + + vc_conn_s6a := DIAMETER_ConnHdlr_CT.create(id); + connect(vc_conn_s6a:DIAMETER, vc_S6a:DIAMETER_CLIENT); + connect(vc_conn_s6a:DIAMETER_PROC, vc_S6a:DIAMETER_PROC); + connect(vc_conn:S6a, vc_conn_s6a:DIAMETER_CLIENT); + connect(vc_conn:S6a_PROC, vc_conn_s6a:DIAMETER_PROC_CLIENT); + vc_conn_s6a.start(f_diam_connhldr_ct_main(pars.imsi)); + + vc_conn.start(f_handler_init(fn, pars)); + return vc_conn; +} + +private function f_handler_init(void_fn fn, SessionPars pars) +runs on Cli_Session_CT { + g_pars := valueof(pars); + fn.apply(); +} + +/* ULR + ULA against HSS */ +private function f_dia_ulr_ula() runs on Cli_Session_CT { + var octetstring sess_id := char2oct("foobar"); + var template (present) AVP_list sub_data; + var PDU_DIAMETER rx_dia; + var UINT32 hbh_id := int2oct(g_pars.s6a_next_hbh_id, 4); + var UINT32 ete_id := int2oct(g_pars.s6a_next_ete_id, 4); + + /* Unlike ULR, ULA contains no IMSI. Register ete_id in DIAMETER_Emulation, + * so AIA is forwarded back to us in DIAMETER port instead of MTC_CT.DIAMETER_UNIT. + */ + f_diam_connhldr_expect_eteid(ete_id); + + /* TODO: change this into a ts_DIA_ULR */ + S6a.send(ts_DIA_ULR(g_pars.imsi, '111F11'O, sess_id, + mp_diam_orig_host, mp_diam_orig_realm, + mp_diam_dest_realm, hbh_id, ete_id)); + g_pars.s6a_next_hbh_id := g_pars.s6a_next_hbh_id + 1; + g_pars.s6a_next_ete_id := g_pars.s6a_next_ete_id + 1; + + sub_data := superset( + tr_AVP_3GPP_SubscriberStatus(SERVICE_GRANTED), + tr_AVP_3GPP_SubscrRauTauTmr(?), + tr_AVP_3GPP_AMBR(?, ?), + tr_AVP_3GPP_ApnConfigProfile(superset( + tr_AVP_3GPP_ContextId(?), + tr_AVP_3GPP_AllApnConfigsIncl, + tr_AVP_3GPP_ApnConfig(?, ?, ?) + )) + ); + + alt { + [] S6a.receive(tr_DIA_ULA(sub_data, sess_id, ?, ?, hbh_id, ete_id)) -> value rx_dia { + setverdict(pass); + } + [] S6a.receive(PDU_DIAMETER:?) -> value rx_dia { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Received unexpected DIAMETER ", rx_dia)); + } + } +} + +/* create a session, expect it to succeed */ +private function f_TC_ulr_ula() runs on Cli_Session_CT { + f_dia_ulr_ula(); + setverdict(pass); +} +testcase TC_ulr_ula() runs on MTC_CT { + var Cli_Session_CT vc_conn; + var SessionPars pars := valueof(t_SessionPars(subscribers[0])); + f_init(); + vc_conn := f_start_handler(refers(f_TC_ulr_ula), pars); + vc_conn.done; +} + + +control { + execute( TC_ulr_ula() ); +} + + +} diff --git a/hss/expected-results.xml b/hss/expected-results.xml new file mode 100644 index 0000000..8e8d1df --- /dev/null +++ b/hss/expected-results.xml @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<testsuite name='Titan' tests='1' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'> + <testcase classname='HSS_Tests' name='TC_ulr_ula' time='MASKED'/> +</testsuite> diff --git a/hss/gen_links.sh b/hss/gen_links.sh new file mode 100755 index 0000000..b97d53f --- /dev/null +++ b/hss/gen_links.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +BASEDIR=../deps + +. ../gen_links.sh.inc + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " # GSM 7-bit coding +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.DIAMETER_ProtocolModule_Generator/src +FILES="DIAMETER_EncDec.cc" +gen_links $DIR $FILES + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc " +FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn DIAMETER_Templates.ttcn " +gen_links $DIR $FILES + +ignore_pp_results diff --git a/hss/regen_makefile.sh b/hss/regen_makefile.sh new file mode 100755 index 0000000..23fbd73 --- /dev/null +++ b/hss/regen_makefile.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +NAME=HSS_Tests + +FILES=" + *.ttcn + DIAMETER_CodecPort_CtrlFunctDef.cc + DIAMETER_EncDec.cc + IPL4asp_PT.cc + IPL4asp_discovery.cc + Native_FunctionDefs.cc + TCCConversion.cc + TCCEncoding.cc + TCCInterface.cc +" + +export CPPFLAGS_TTCN3=" +" + +../regen-makefile.sh -e $NAME $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34714?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic2fccd9c54aea04f1a31649a0af47c974939fb2f Gerrit-Change-Number: 34714 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in ...osmo-epdg[master]: Add config envvars to change GSUP server listen IP addr and port
by pespin 15 Oct '23

15 Oct '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34741?usp=email ) Change subject: Add config envvars to change GSUP server listen IP addr and port ...................................................................... Add config envvars to change GSUP server listen IP addr and port Change-Id: I55244df82ee50b268ef0cbbe698e691707e8a716 --- M config/sys.config M src/osmo_epdg_sup.erl 2 files changed, 21 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve diff --git a/config/sys.config b/config/sys.config index f9fd5ed..8d751b9 100755 --- a/config/sys.config +++ b/config/sys.config @@ -2,11 +2,14 @@ %% Application config %% =========================================== {osmo_epdg, - [% Connection parameters + [% GSUP Server connection parameters + {gsup_local_ip, "0.0.0.0"}, + {gsup_local_port, 4222}, + % Diameter Connection parameters {diameter_remote_ip, "127.0.0.1"}, {diameter_remote_port, 3868}, {diameter_proto, sctp}, - % Server parameters + % Diameter Server parameters {vendor_id, 0}, {origin_host, "epdg.localdomain"}, {origin_realm, "localdomain"}, diff --git a/src/osmo_epdg_sup.erl b/src/osmo_epdg_sup.erl index a523a7f..457d993 100644 --- a/src/osmo_epdg_sup.erl +++ b/src/osmo_epdg_sup.erl @@ -5,16 +5,22 @@ -export([init/1]). -define(SERVER, ?MODULE). +-define(ENV_APP_NAME, osmo_epdg). +-define(ENV_DEFAULT_GSUP_LOCAL_IP, "0.0.0.0"). +-define(ENV_DEFAULT_GSUP_LOCAL_PORT, 4222). + start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> + GsupLocalIp = application:get_env(?ENV_APP_NAME, gsup_local_ip, ?ENV_DEFAULT_GSUP_LOCAL_IP), + GsupLocalPort = application:get_env(?ENV_APP_NAME, gsup_local_port, ?ENV_DEFAULT_GSUP_LOCAL_PORT), DiaServer = {epdg_diameter_swx, {epdg_diameter_swx,start_link,[]}, permanent, 5000, worker, [epdg_diameter_swx_cb]}, - GsupServer = {gsup_server, {gsup_server, start_link, ["0.0.0.0", 4222, []]}, + GsupServer = {gsup_server, {gsup_server, start_link, [GsupLocalIp, GsupLocalPort, []]}, permanent, 5000, worker, -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34741?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I55244df82ee50b268ef0cbbe698e691707e8a716 Gerrit-Change-Number: 34741 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in ...osmo-epdg[master]: Several fixes and improvement around env config use
by pespin 15 Oct '23

15 Oct '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34740?usp=email ) Change subject: Several fixes and improvement around env config use ...................................................................... Several fixes and improvement around env config use For some unknown reason, when app is run as an escript it fails to match/load the config files unless the AppName osmo-epdg is used. Change-Id: I729513ff1f904b78971d22e49622707c8bc0e4aa --- M config/sys.config M src/epdg_diameter_swx.erl 2 files changed, 35 insertions(+), 14 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve diff --git a/config/sys.config b/config/sys.config index 23f7936..f9fd5ed 100755 --- a/config/sys.config +++ b/config/sys.config @@ -1,16 +1,16 @@ [%% =========================================== %% Application config %% =========================================== - {epdg_diameter_swx, + {osmo_epdg, [% Connection parameters - {diameter_server_ip, "192.168.56.132"}, - {diameter_port, 3868}, + {diameter_remote_ip, "127.0.0.1"}, + {diameter_remote_port, 3868}, {diameter_proto, sctp}, % Server parameters {vendor_id, 0}, - {origin_host, "aaa.gprs.fe80.eu"}, - {origin_realm, "gprs.fe80.eu"}, - {context_id, "gprs(a)giameter.com"}]}, + {origin_host, "epdg.localdomain"}, + {origin_realm, "localdomain"}, + {context_id, "epdg@localdomain"}]}, %% =========================================== %% SASL config %% =========================================== diff --git a/src/epdg_diameter_swx.erl b/src/epdg_diameter_swx.erl index 9909446..fe89f11 100644 --- a/src/epdg_diameter_swx.erl +++ b/src/epdg_diameter_swx.erl @@ -59,6 +59,14 @@ -define(APP_ALIAS, ?MODULE). -define(CALLBACK_MOD, epdg_diameter_swx_cb). -define(DIAMETER_DICT_SWX, diameter_3gpp_ts29_273_swx). +-define(ENV_APP_NAME, osmo_epdg). +-define(ENV_DEFAULT_SESSION_ID, "epdg@localdomain"). +-define(ENV_DEFAULT_ORIG_REALM, "localdomain"). +-define(ENV_DEFAULT_ORIG_HOST, "epdg.localdomain"). +-define(ENV_DEFAULT_VENDOR_ID, 0). +-define(ENV_DEFAULT_DIAMETER_PROTO, sctp). +-define(ENV_DEFAULT_DIAMETER_REMOTE_IP, "127.0.0.1"). +-define(ENV_DEFAULT_DIAMETER_REMOTE_PORT, 3868). -define(VENDOR_ID_3GPP, 10415). -define(VENDOR_ID_3GPP2, 5535). @@ -68,9 +76,9 @@ %% supporting multiple Diameter applications may or may not want to %% configure a common callback module on all applications. -define(SERVICE, - [{'Origin-Host', application:get_env(?SERVER, origin_host, "aaa.example.org")}, - {'Origin-Realm', application:get_env(?SERVER, origin_realm, "realm.example.org")}, - {'Vendor-Id', application:get_env(?SERVER, vendor_id, 0)}, + [{'Origin-Host', application:get_env(?ENV_APP_NAME, origin_host, ?ENV_DEFAULT_ORIG_HOST)}, + {'Origin-Realm', application:get_env(?ENV_APP_NAME, origin_realm, ?ENV_DEFAULT_ORIG_REALM)}, + {'Vendor-Id', application:get_env(?ENV_APP_NAME, vendor_id, ?ENV_DEFAULT_VENDOR_ID)}, {'Vendor-Specific-Application-Id', [#'diameter_base_Vendor-Specific-Application-Id'{ 'Vendor-Id' = ?VENDOR_ID_3GPP, @@ -110,9 +118,9 @@ ok. init(State) -> - Proto = application:get_env(?SERVER, diameter_proto, sctp), - Ip = application:get_env(?SERVER, diameter_server_ip, "192.168.56.132"), - Port = application:get_env(?SERVER, diameter_port, 3868), + Proto = application:get_env(?ENV_APP_NAME, diameter_proto, ?ENV_DEFAULT_DIAMETER_PROTO), + Ip = application:get_env(?ENV_APP_NAME, diameter_remote_ip, ?ENV_DEFAULT_DIAMETER_REMOTE_IP), + Port = application:get_env(?ENV_APP_NAME, diameter_remote_port, ?ENV_DEFAULT_DIAMETER_REMOTE_PORT), ok = diameter:start_service(?MODULE, ?SERVICE), % lager:info("DiaServices is ~p~n", [DiaServ]), {ok, _} = connect({address, Proto, Ip, Port}), @@ -159,7 +167,7 @@ % parse_mar(#'MAA'{'Experimental-Result-Code' = [ResultCode] = MAA) -> handle_call({mar, {IMSI, NumAuthItems, AuthScheme, RAT, CKey, IntegrityKey}}, _From, State) -> - SessionId = diameter:session_id(application:get_env(?SERVER, origin_host, "aaa.example.org")), + SessionId = diameter:session_id(application:get_env(?ENV_APP_NAME, origin_host, ?ENV_DEFAULT_ORIG_HOST)), MAR = #'MAR'{'Vendor-Specific-Application-Id' = #'Vendor-Specific-Application-Id'{ 'Vendor-Id' = ?VENDOR_ID_3GPP, 'Auth-Application-Id' = [?DIAMETER_APP_ID_SWX]}, @@ -182,7 +190,7 @@ {reply, {error, Err}, State} end; handle_call({sar, {IMSI, Type, APN}}, _From, State) -> - SessionId = diameter:session_id(application:get_env(?SERVER, origin_host, "aaa.example.org")), + SessionId = diameter:session_id(application:get_env(?ENV_APP_NAME, origin_host, ?ENV_DEFAULT_ORIG_HOST)), SAR = #'SAR'{'Vendor-Specific-Application-Id' = #'Vendor-Specific-Application-Id'{ 'Vendor-Id' = ?VENDOR_ID_3GPP, 'Auth-Application-Id' = [?DIAMETER_APP_ID_SWX]}, @@ -236,6 +244,7 @@ %% connect/2 connect(Name, {address, Protocol, IPAddr, Port}) -> + lager:notice("~s connecting to IP ~s port ~p~n", [Name, IPAddr, Port]), {ok, IP} = inet_parse:address(IPAddr), TransportOpts = [{transport_module, tmod(Protocol)}, -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34740?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I729513ff1f904b78971d22e49622707c8bc0e4aa Gerrit-Change-Number: 34740 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in ...osmo-epdg[master]: osmo_epdg_app: Fix formatting error in log string
by pespin 15 Oct '23

15 Oct '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34742?usp=email ) Change subject: osmo_epdg_app: Fix formatting error in log string ...................................................................... Patch Set 1: (1 comment) File src/osmo_epdg_app.erl: https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34742/comment/d8aad247_bf95… PS1, Line 8: ~n > Why is this an error? Looking at osmo_dia2gsup.git, I see all strings are `~n`-terminated. […] It shows up as is in the log output. I think it's because the formatting works only if you pass an extra param with a list of variables. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34742?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: Ib8dfa40ad028f959e4816ce5056ff64d52ec647b Gerrit-Change-Number: 34742 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 15 Oct 2023 21:46:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: gsmtap_util: Fix for embedded
by arehbein 15 Oct '23

15 Oct '23
arehbein has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/34749?usp=email ) Change subject: gsmtap_util: Fix for embedded ...................................................................... gsmtap_util: Fix for embedded Get rid of union member using 'struct osmo sockaddr' (we don't have libosmocore sockets for embedded) Related: OS#6213 Change-Id: Ifaaeae622f01cbe6473d6e28046c01095139f532 --- M include/osmocom/core/osmo_io.h 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/34749/1 diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h index b3d248f..d07cd06 100644 --- a/include/osmocom/core/osmo_io.h +++ b/include/osmocom/core/osmo_io.h @@ -54,7 +54,7 @@ * (e.g. setting lxh or msgb->cb). */ int (*segmentation_cb)(struct msgb *msg); }; - +#if (!EMBEDDED) /* mode OSMO_IO_FD_MODE_RECVFROM_SENDTO: */ struct { /*! call-back function emulating recvfrom */ @@ -67,6 +67,7 @@ const struct osmo_sockaddr *daddr); }; }; +#endif /* (!EMBEDDED) */ }; void osmo_iofd_init(void); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34749?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifaaeae622f01cbe6473d6e28046c01095139f532 Gerrit-Change-Number: 34749 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: gsm48_ie.c: add 3.1kHz audio bearer capability for CSD calls
by jolly 15 Oct '23

15 Oct '23
Attention is currently required from: manawyrm. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34744?usp=email ) Change subject: gsm48_ie.c: add 3.1kHz audio bearer capability for CSD calls ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34744?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I44b76be0f6a891bc1d8f55ede1ef140ea0a19e3d Gerrit-Change-Number: 34744 Gerrit-PatchSet: 1 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Comment-Date: Sun, 15 Oct 2023 14:23:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-msc[master]: csd_bs: force rate adaptation mode for CSD calls to V.110
by fixeria 15 Oct '23

15 Oct '23
Attention is currently required from: manawyrm. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/34748?usp=email ) Change subject: csd_bs: force rate adaptation mode for CSD calls to V.110 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/34748?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5b3e5649fe071636f1becddfbfee06f9175a5f17 Gerrit-Change-Number: 34748 Gerrit-PatchSet: 1 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Comment-Date: Sun, 15 Oct 2023 13:23:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: send UL/DL GPRS blocks over GSMTAP
by fixeria 15 Oct '23

15 Oct '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34733?usp=email ) Change subject: layer23: send UL/DL GPRS blocks over GSMTAP ...................................................................... layer23: send UL/DL GPRS blocks over GSMTAP Note that despite the VTY interface offers various channel type filtering facilities, the actual filtering is not implemented. This patch simply brings PS domain in consistency with CS domain: the UL and DL GPRS blocks are now being sent over GSMTAP without any filtering, just like GSM MAC blocks. Change-Id: I338205bee44fe182233efc5619a3d528cd07d932 Related: OS#5500, OS#6209 --- M src/host/layer23/src/common/l1ctl.c 1 file changed, 37 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index 589af09..c4589f0 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -961,6 +961,8 @@ static int rx_l1_gprs_dl_block_ind(struct osmocom_ms *ms, struct msgb *msg) { const struct l1ctl_gprs_dl_block_ind *ind = (void *)msg->l1h; + uint8_t gsmtap_chan; + uint32_t fn; if (msgb_l1len(msg) < sizeof(*ind)) { LOGP(DL1C, LOGL_ERROR, @@ -977,8 +979,20 @@ msg->l2h = (void *)&ind->data[0]; + fn = ntohl(ind->hdr.fn); + if ((fn % 104) == 12) + gsmtap_chan = GSMTAP_CHANNEL_PTCCH; + else + gsmtap_chan = GSMTAP_CHANNEL_PDTCH; + + gsmtap_send(l23_cfg.gsmtap.inst, + ms->rrlayer.cd_now.arfcn, + ind->hdr.tn, gsmtap_chan, 0, fn, + rxlev2dbm(ind->meas.rx_lev), 0, + msgb_l2(msg), msgb_l2len(msg)); + DEBUGP(DL1C, "Rx GPRS DL block (fn=%u, tn=%u, len=%u): %s\n", - ntohl(ind->hdr.fn), ind->hdr.tn, msgb_l2len(msg), msgb_hexdump_l2(msg)); + fn, ind->hdr.tn, msgb_l2len(msg), msgb_hexdump_l2(msg)); /* distribute or drop */ if (ms->l1_entity.l1_gprs_dl_block_ind) @@ -1037,6 +1051,11 @@ DEBUGP(DL1C, "Tx GPRS UL block (fn=%u, tn=%u, len=%zu): %s\n", fn, tn, data_len, osmo_hexdump(data, data_len)); + gsmtap_send(l23_cfg.gsmtap.inst, + ms->rrlayer.cd_now.arfcn | GSMTAP_ARFCN_F_UPLINK, + tn, GSMTAP_CHANNEL_PDTCH, 0, fn, 127, 0, + data, data_len); + return osmo_send_l1(ms, msg); } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34733?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I338205bee44fe182233efc5619a3d528cd07d932 Gerrit-Change-Number: 34733 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmocore[master]: gsm48_ie.c: force rate adaptation mode for CSD calls to V.110
by manawyrm 15 Oct '23

15 Oct '23
manawyrm has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34745?usp=email ) Change subject: gsm48_ie.c: force rate adaptation mode for CSD calls to V.110 ...................................................................... Abandoned replaced by osmo-msc change, https://gerrit.osmocom.org/c/osmo-msc/+/34748 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34745?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I260834f3d28034afa6b50a6ca8c89accba8fa65b Gerrit-Change-Number: 34745 Gerrit-PatchSet: 3 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de> Gerrit-MessageType: abandon
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • ...
  • 185
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.