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

February 2024

  • 1 participants
  • 1748 discussions
[S] Change in ...osmo-epdg[master]: Create pdp context in the tundev
by pespin 12 Feb '24

12 Feb '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35944?usp=email ) Change subject: Create pdp context in the tundev ...................................................................... Create pdp context in the tundev Use gtp_u_kmod call to create a pdp context in the gtp interface. Change-Id: I4e0b3fe0e3e156c9a20df0ab8cdfc447fd9bb1eb --- M src/gtp_u_tun.erl 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg refs/changes/44/35944/1 diff --git a/src/gtp_u_tun.erl b/src/gtp_u_tun.erl index e08b804..626c9a4 100644 --- a/src/gtp_u_tun.erl +++ b/src/gtp_u_tun.erl @@ -64,7 +64,5 @@ %RemoteTEID = 56768, % TODO: this should be set to TEID obtained from CreateSessionResponse PeerIP = conv:bin_to_ip(PeerAddr), % TODO: IPv6 UEIP = conv:bin_to_ip(EUA#epdg_eua.ipv4), % TODO: IPv6. - ok. - % TODO: This will be enabled once we depend on the gtp_u_kmod module: - %ServRef = get_env_gtp_u_kmod_server_ref(), - %gen_server:call(ServRef, {PeerIP, UEIP, LocalTEID, RemoteTEID}). \ No newline at end of file + ServRef = get_env_gtp_u_kmod_server_ref(), + gen_server:call(ServRef, {PeerIP, UEIP, LocalTEID, RemoteTEID}). -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35944?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: I4e0b3fe0e3e156c9a20df0ab8cdfc447fd9bb1eb Gerrit-Change-Number: 35944 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in ...osmo-epdg[master]: Use gtp_u_kmod to create a gtp tundev
by pespin 12 Feb '24

12 Feb '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35943?usp=email ) Change subject: Use gtp_u_kmod to create a gtp tundev ...................................................................... Use gtp_u_kmod to create a gtp tundev Adding gtp_u_kmod app in osmo_epdg.app.src makes the module app started and create gtp tunnel based on config file upon startup. No other operation is done yet on the tunnel, but this step already allows testing by manually creating pdp contexts outside of the app. The module gtp_u_kmod currently creates the tundev interface with name "gtp0" (hardcoded). The module gtp_u_kmod will fail if the gtp tundev is already created, so be sure to have it removed before starting osmo-epdg. Change-Id: Ie7718e1b161477bd738fa75f803ab37e9f35121d --- M config/sys.config M debian/osmo-epdg.install M rebar.config M rebar.lock M src/osmo_epdg.app.src 5 files changed, 67 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg refs/changes/43/35943/1 diff --git a/config/sys.config b/config/sys.config index 905b8a1..d5b99f2 100755 --- a/config/sys.config +++ b/config/sys.config @@ -38,6 +38,33 @@ {gtpc_remote_port, 2123} ]}, %% =========================================== + %% gtp_u_kmod config + %% =========================================== + {gtp_u_kmod, [ + %% grx: Name used to log by the module. + {sockets, [{grx, [%% ip: IP Address assigned at the tunnel. TODO: not currently applied? + {ip, {192,0,2,16}}, + %% Create the tun socket on a given netns: + %%{netns, "mynetns"}, + %% Bind tun socket to a particular interface (SO_BINDTODEVICE): + %%{netdev, "grx"}, + %% Allow binding to an IP address that is nonlocal or does not (yet) exist (IP_FREEBIND): + freebind, + {vrf, [{routes, [{{10, 180, 0, 0}, 16}]}%%, + %%{netdev, "upstream"} + ] + } + ] + }] + } + ]}, + %% =========================================== + %% gen_socket config + %% =========================================== + {gen_socket, [ + {libdir, "_build/default/lib/gen_socket/priv/lib"} +]}, + %% =========================================== %% Lager logging config %% =========================================== {lager, [ diff --git a/debian/osmo-epdg.install b/debian/osmo-epdg.install index 0840d06..62aec37 100644 --- a/debian/osmo-epdg.install +++ b/debian/osmo-epdg.install @@ -1,2 +1,3 @@ /contrib/systemd/osmo-epdg.service /lib/systemd/system/ /_build/default/bin/osmo-epdg /usr/bin/ +/_build/default/lib/gen_socket/priv/lib/gen_socket*.so /usr/lib/${DEB_HOST_MULTIARCH}/ diff --git a/rebar.config b/rebar.config index 19688f5..8541410 100644 --- a/rebar.config +++ b/rebar.config @@ -5,6 +5,7 @@ {deps, [ {lager, {git, "https://github.com/erlang-lager/lager", {tag, "3.9.2"}}}, {gtplib, "3.2.0"}, + {gtp_u_kmod, {git, "https://github.com/osmocom/gtp_u_kmod", {branch, "osmocom/master"}}}, {osmo_ss7, {git, "https://gitea.osmocom.org/erlang/osmo_ss7", {ref, "9f294d3612f998860004820d1d85b4264721577b"}}}, {osmo_gsup, {git, "https://gerrit.osmocom.org/erlang/osmo_gsup", {branch, "osmocom/epdg"}}} ]}. diff --git a/rebar.lock b/rebar.lock index a542cbc..fb3a190 100644 --- a/rebar.lock +++ b/rebar.lock @@ -4,7 +4,23 @@ {git,"https://github.com/msantos/epcap", {ref,"b98edbfbb0392101cd874b098caa5180f2f44b2e"}}, 1}, + {<<"erlando">>, + {git,"https://github.com/travelping/erlando.git", + {ref,"2cb56e06308beb4d65ae2217a02dc60bafc99b9d"}}, + 1}, + {<<"gen_netlink">>, + {git,"https://github.com/osmocom/gen_netlink", + {ref,"82c31b9d36ca8c524db0670b01a3e4ee69058930"}}, + 1}, + {<<"gen_socket">>, + {git,"https://github.com/osmocom/gen_socket", + {ref,"35e11d6e2f6d87b02dcfc7507a9500bf7ca7329e"}}, + 2}, {<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1}, + {<<"gtp_u_kmod">>, + {git,"https://github.com/osmocom/gtp_u_kmod", + {ref,"80b935629202af1bcc909367df5ce4b89f584dea"}}, + 0}, {<<"gtplib">>,{pkg,<<"gtplib">>,<<"3.2.0">>},0}, {<<"lager">>, {git,"https://github.com/erlang-lager/lager", diff --git a/src/osmo_epdg.app.src b/src/osmo_epdg.app.src index ec60bd2..4481df5 100644 --- a/src/osmo_epdg.app.src +++ b/src/osmo_epdg.app.src @@ -11,7 +11,8 @@ gtplib, diameter, osmo_gsup, - osmo_ss7 + osmo_ss7, + gtp_u_kmod ]}, {mod, {osmo_epdg_app, []}}, {env, []} -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35943?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: Ie7718e1b161477bd738fa75f803ab37e9f35121d Gerrit-Change-Number: 35943 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: epdg: Fix FTEID interface in CreateSessionResponse
by pespin 12 Feb '24

12 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35933?usp=email ) Change subject: epdg: Fix FTEID interface in CreateSessionResponse ...................................................................... epdg: Fix FTEID interface in CreateSessionResponse Change-Id: If7ce6580c4690473d9c34ca58f704c8ff535f166 --- M epdg/EPDG_Tests.ttcn 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn index e104cdc..89a85f1 100644 --- a/epdg/EPDG_Tests.ttcn +++ b/epdg/EPDG_Tests.ttcn @@ -454,9 +454,9 @@ /* Upon rx of CreateSession, emulate PGW asking the AAA server. */ f_S6b_AA_success(); - fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S2b_ePDG_GTPC, g_pars.teic_local, 1, + fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S2b_PGW_GTPC, g_pars.teic_local, 1, f_inet_addr(mp_s2b_local_ip), omit); - fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S2bU_ePDG_GTPU, g_pars.bearer.teid_local, 4, + fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S2bU_PGW_GTPU, g_pars.bearer.teid_local, 4, f_inet_addr(mp_s2b_local_ip), omit); paa := ts_GTP2C_PdnAddrAlloc_v4(f_inet_addr(g_pars.ue_ip)); bctx_ies := ts_GTP2C_BcContextIE(ebi := g_pars.bearer.ebi, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35933?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: If7ce6580c4690473d9c34ca58f704c8ff535f166 Gerrit-Change-Number: 35933 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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-ttcn3-hacks[master]: epdg: Fix UsernMame being NAI instead of IMSI in S6b AAR
by pespin 12 Feb '24

12 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35932?usp=email ) Change subject: epdg: Fix UsernMame being NAI instead of IMSI in S6b AAR ...................................................................... epdg: Fix UsernMame being NAI instead of IMSI in S6b AAR Change-Id: Ifa5b262db40b649c6dfe7b5ac43098208b3e8300 --- M epdg/EPDG_Tests.ttcn M library/DIAMETER_ts29_273_Templates.ttcn 2 files changed, 18 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn index a7c9509..e104cdc 100644 --- a/epdg/EPDG_Tests.ttcn +++ b/epdg/EPDG_Tests.ttcn @@ -37,6 +37,8 @@ integer mp_s6b_local_port := 3869; charstring mp_s6b_remote_ip := "127.0.0.1"; integer mp_s6b_remote_port := 3869; + /* 3GPP TS 23.003 clause 19: "nai.epc.mnc<MNC>.mcc<MCC>.3gppnetwork.org" */ + charstring mp_s6b_nai_realm := "nai.epc.mnc001.mcc01.3gppnetwork.org"; /* our emulated PGW (GTPv2C S2b) */ charstring mp_s2b_local_ip := "127.0.0.100"; @@ -332,6 +334,10 @@ return vc_conn; } +private function f_nai() runs on EPDG_ConnHdlr return charstring { + return hex2str(g_pars.imsi) & "@" & mp_s6b_nai_realm; +} + /* Diameter SWx MAR + MAA. */ private altstep as_DIA_SWx_MA_success() runs on EPDG_ConnHdlr { var PDU_DIAMETER rx_dia; @@ -390,7 +396,7 @@ */ f_epdg_connhldr_S6b_expect_eteid(ete_id); - S6b.send(ts_DIA_S6b_AAR(g_pars.imsi, + S6b.send(ts_DIA_S6b_AAR(f_nai(), int2oct(DIA_TS29_373_MIP6_Feature_Vector_GTPv2_SUPPORTED, 8), g_pars.apn, hbh_id := hbh_id, ete_id := ete_id)); diff --git a/library/DIAMETER_ts29_273_Templates.ttcn b/library/DIAMETER_ts29_273_Templates.ttcn index 71f6cfc..e3a6c2f 100644 --- a/library/DIAMETER_ts29_273_Templates.ttcn +++ b/library/DIAMETER_ts29_273_Templates.ttcn @@ -205,7 +205,7 @@ /* TS 29.273 9.2.2.5.1 AA-Request (AAR) */ template (value) PDU_DIAMETER -ts_DIA_S6b_AAR(template (value) hexstring imsi, +ts_DIA_S6b_AAR(template (value) charstring username_nai, template (value) MIPv6_NONE_MIP6_Feature_Vector mip6_feat_vec, template (value) charstring apn, template (value) octetstring sess_id := c_def_sess_id, @@ -227,7 +227,7 @@ ts_AVP_OriginRealm(orig_realm), ts_AVP_DestinationRealm(dest_realm), ts_AVP_AuthRequestType(AUTHORIZE_ONLY), - ts_AVP_UserNameImsi(valueof(imsi)), + ts_AVP_UserName(char2oct(valueof(username_nai))), ts_AVP_MIP6FeatureVector(mip6_feat_vec), ts_AVP_ServiceSelection(valueof(apn)) /* TODO: Lots other optional */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35932?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: Ifa5b262db40b649c6dfe7b5ac43098208b3e8300 Gerrit-Change-Number: 35932 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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-ttcn3-hacks[master]: epdg: Fix instance in CreateSession Re S2b-U PGW F-TEID IE
by pespin 12 Feb '24

12 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35930?usp=email ) Change subject: epdg: Fix instance in CreateSession Re S2b-U PGW F-TEID IE ...................................................................... epdg: Fix instance in CreateSession Re S2b-U PGW F-TEID IE According to 3GPP TS 29.274 Table 7.2.2-1, instance=1. Change-Id: If0e2425e0a64e528990bfd589b858d0955a4677a --- M epdg/EPDG_Tests.ttcn 1 file changed, 12 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn index 03ea275..a7c9509 100644 --- a/epdg/EPDG_Tests.ttcn +++ b/epdg/EPDG_Tests.ttcn @@ -448,7 +448,7 @@ /* Upon rx of CreateSession, emulate PGW asking the AAA server. */ f_S6b_AA_success(); - fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S2b_ePDG_GTPC, g_pars.teic_local, 0, + fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S2b_ePDG_GTPC, g_pars.teic_local, 1, f_inet_addr(mp_s2b_local_ip), omit); fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S2bU_ePDG_GTPU, g_pars.bearer.teid_local, 4, f_inet_addr(mp_s2b_local_ip), omit); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35930?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: If0e2425e0a64e528990bfd589b858d0955a4677a Gerrit-Change-Number: 35930 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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-ttcn3-hacks[master]: epdg: Fix FTEID interface in CreateSessionResponse
by pespin 12 Feb '24

12 Feb '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35933?usp=email ) Change subject: epdg: Fix FTEID interface in CreateSessionResponse ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35933?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: If7ce6580c4690473d9c34ca58f704c8ff535f166 Gerrit-Change-Number: 35933 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Feb 2024 09:52:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: epdg: Fix UsernMame being NAI instead of IMSI in S6b AAR
by pespin 12 Feb '24

12 Feb '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35932?usp=email ) Change subject: epdg: Fix UsernMame being NAI instead of IMSI in S6b AAR ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35932?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: Ifa5b262db40b649c6dfe7b5ac43098208b3e8300 Gerrit-Change-Number: 35932 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Feb 2024 09:52:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: epdg: Fix instance in CreateSession Re S2b-U PGW F-TEID IE
by pespin 12 Feb '24

12 Feb '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35930?usp=email ) Change subject: epdg: Fix instance in CreateSession Re S2b-U PGW F-TEID IE ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35930?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: If0e2425e0a64e528990bfd589b858d0955a4677a Gerrit-Change-Number: 35930 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Feb 2024 09:51:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in ...osmo-epdg[master]: Expect NAI instead of Imsi in S6b AAR
by pespin 12 Feb '24

12 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35931?usp=email ) Change subject: Expect NAI instead of Imsi in S6b AAR ...................................................................... Expect NAI instead of Imsi in S6b AAR Change-Id: I6599b84c2a0e1a758cb63bb9e419fa4c3cf4f4a6 --- M src/aaa_diameter_s6b_cb.erl M src/conv.erl 2 files changed, 22 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/aaa_diameter_s6b_cb.erl b/src/aaa_diameter_s6b_cb.erl index 7e3915d..ab15bd6 100644 --- a/src/aaa_diameter_s6b_cb.erl +++ b/src/aaa_diameter_s6b_cb.erl @@ -59,7 +59,8 @@ 'Auth-Request-Type' = AuthReqType, 'User-Name' = [UserName], 'Service-Selection' = [Apn]} = Req, - PidRes = aaa_ue_fsm:get_pid_by_imsi(UserName), + Imsi = conv:nai_to_imsi(UserName), + PidRes = aaa_ue_fsm:get_pid_by_imsi(Imsi), case PidRes of PidRes when is_pid(PidRes) -> ok = aaa_ue_fsm:ev_rx_s6b_aar(PidRes, Apn), @@ -67,7 +68,7 @@ receive {aaa, ResultCode} -> lager:debug("Rx AAA with ResultCode=~p~n", [ResultCode]) end; - undefined -> lager:error("Error looking up FSM for IMSI~n", [UserName]), + undefined -> lager:error("Error looking up FSM for IMSI~n", [Imsi]), ResultCode = ?'RULE-FAILURE-CODE_CM_AUTHORIZATION_REJECTED' end, Resp = #'AAA'{'Session-Id'= SessionId, diff --git a/src/conv.erl b/src/conv.erl index 95e103d..cdba445 100644 --- a/src/conv.erl +++ b/src/conv.erl @@ -41,6 +41,7 @@ -export([ip_to_bin/1, bin_to_ip/1]). -export([cause_gtp2gsup/1]). -export([gtp2_paa_to_epdg_eua/1, epdg_eua_to_gsup_pdp_address/1]). +-export([nai_to_imsi/1]). % ergw_aaa/src/ergw_aaa_3gpp_dict.erl % under GPLv2+ @@ -93,3 +94,12 @@ pdp_type_nr => ?GTP_PDP_ADDR_TYPE_NR_IPv6, address => #{ ipv6 => Addr}}. %TODO: IPv4v6 + +% 3GPP TS 23.003 clause 19 +% Input: "<IMSI>@nai.epc.mnc<MNC>.mcc<MCC>.3gppnetwork.org" +% % TODO: lead number prefix +nai_to_imsi(NAI) -> + NAIRev = string:reverse(NAI), + ImsiRev = string:find(NAIRev, "@", trailing), + ImsiRev2 = string:trim(ImsiRev, leading, "@"), + string:reverse(ImsiRev2). -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35931?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: I6599b84c2a0e1a758cb63bb9e419fa4c3cf4f4a6 Gerrit-Change-Number: 35931 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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]: gsup_server: Allow receiveing AuthInfo without PdpInfo
by pespin 12 Feb '24

12 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35929?usp=email ) Change subject: gsup_server: Allow receiveing AuthInfo without PdpInfo ...................................................................... gsup_server: Allow receiveing AuthInfo without PdpInfo Change-Id: Ife5293fd5942875c13bf29a462496bd8ea9212b7 --- M src/gsup_server.erl 1 file changed, 21 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/src/gsup_server.erl b/src/gsup_server.erl index 065abb4..6930673 100644 --- a/src/gsup_server.erl +++ b/src/gsup_server.erl @@ -228,13 +228,18 @@ % send auth info / requesting authentication tuples handle_info({ipa, Socket, ?IPAC_PROTO_EXT_GSUP, GsupMsgRx = #{message_type := send_auth_info_req, imsi := Imsi}}, State0) -> - #{pdp_info_list := [PdpInfo]} = GsupMsgRx, - #{pdp_context_id := _PDPCtxId, - pdp_address := #{address := #{}, - pdp_type_nr := PdpTypeNr, - pdp_type_org := 241}, - access_point_name := Apn - } = PdpInfo, + case maps:find(pdp_info_list, GsupMsgRx) of + {ok, [PdpInfo]} -> + #{pdp_context_id := _PDPCtxId, + pdp_address := #{address := #{}, + pdp_type_nr := PdpTypeNr, + pdp_type_org := 241}, + access_point_name := Apn + } = PdpInfo; + error -> % Use some sane defaults: + PdpTypeNr = ?GTP_PDP_ADDR_TYPE_NR_IPv4, + Apn = "*" + end, {UE, State1} = find_or_new_gsups_ue(Imsi, State0), case epdg_ue_fsm:auth_request(UE#gsups_ue.pid, {PdpTypeNr, Apn}) of ok -> State2 = State1; -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35929?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: Ife5293fd5942875c13bf29a462496bd8ea9212b7 Gerrit-Change-Number: 35929 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • ...
  • 175
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.