[S] Change in ...osmo-epdg[master]: gsup_server: Log rx of all GSUP messages

2024-02-21 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36050?usp=email )


Change subject: gsup_server: Log rx of all GSUP messages
..

gsup_server: Log rx of all GSUP messages

Change-Id: I348e20f65e8bdb713819256615a84292ed4e9833
---
M src/gsup_server.erl
1 file changed, 12 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg 
refs/changes/50/36050/1

diff --git a/src/gsup_server.erl b/src/gsup_server.erl
index 6bb98ee..0af015c 100644
--- a/src/gsup_server.erl
+++ b/src/gsup_server.erl
@@ -228,6 +228,7 @@
 
 % send auth info / requesting authentication tuples
 handle_info({ipa, Socket, ?IPAC_PROTO_EXT_GSUP, GsupMsgRx = #{message_type := 
send_auth_info_req, imsi := Imsi}}, State0) ->
+   lager:info("GSUP: Rx ~p~n", [GsupMsgRx]),
case maps:find(pdp_info_list, GsupMsgRx) of
{ok, [PdpInfo]} ->
#{pdp_context_id := _PDPCtxId,
@@ -258,7 +259,8 @@

 % location update request / when a UE wants to connect to a specific APN. This 
will trigger a AAA->HLR Request Server Assignment Request
 % FIXME: add APN instead of hardcoded internet
-handle_info({ipa, Socket, ?IPAC_PROTO_EXT_GSUP, _GsupMsgRx = #{message_type := 
location_upd_req, imsi := Imsi}}, State) ->
+handle_info({ipa, Socket, ?IPAC_PROTO_EXT_GSUP, GsupMsgRx = #{message_type := 
location_upd_req, imsi := Imsi}}, State) ->
+   lager:info("GSUP: Rx ~p~n", [GsupMsgRx]),
UE = find_gsups_ue_by_imsi(Imsi, State),
case UE of
#gsups_ue{imsi = Imsi} ->

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36050?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: I348e20f65e8bdb713819256615a84292ed4e9833
Gerrit-Change-Number: 36050
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in ...osmo-epdg[master]: Use osmocom gtplib pointing to newer version of code

2024-02-21 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36052?usp=email )


Change subject: Use osmocom gtplib pointing to newer version of code
..

Use osmocom gtplib pointing to newer version of code

Change-Id: Iaf2e195aaeac6d1b157a4b0dd6cd3d80deaa1308
---
M rebar.config
M rebar.lock
2 files changed, 16 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg 
refs/changes/52/36052/1

diff --git a/rebar.config b/rebar.config
index 8541410..1dd0b08 100644
--- a/rebar.config
+++ b/rebar.config
@@ -4,7 +4,7 @@

 {deps, [
{lager, {git, "https://github.com/erlang-lager/lager;, {tag, "3.9.2"}}},
-   {gtplib, "3.2.0"},
+   {gtplib, {git, "https://github.com/osmocom/gtplib;, {branch, 
"osmocom/master"}}},
{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 0a492b3..f300534 100644
--- a/rebar.lock
+++ b/rebar.lock
@@ -21,21 +21,24 @@
   {git,"https://github.com/osmocom/gtp_u_kmod;,
{ref,"b3656ebb11528a2db3171dbf94f1a8bf0d6ffd00"}},
   0},
- {<<"gtplib">>,{pkg,<<"gtplib">>,<<"3.2.0">>},0},
+ {<<"gtplib">>,
+  {git,"https://github.com/osmocom/gtplib;,
+   {ref,"4a1458bed784693cabf1edbea9712f2201f2e7ca"}},
+  0},
  {<<"lager">>,
   {git,"https://github.com/erlang-lager/lager;,
{ref,"459a3b2cdd9eadd29e5a7ce5c43932f5ccd6eb88"}},
   0},
  {<<"osmo_gsup">>,
   {git,"https://gerrit.osmocom.org/erlang/osmo_gsup;,
-   {ref,"1391d074f610e736368319d56fd958fa36e3addf"}},
+   {ref,"25ace76f98f7f931691fb02d86667062b4f2c8ad"}},
   0},
  {<<"osmo_ss7">>,
   {git,"https://gitea.osmocom.org/erlang/osmo_ss7;,
{ref,"9f294d3612f998860004820d1d85b4264721577b"}},
   0},
  {<<"parse_trans">>,
-  {git,"https://github.com/uwiger/parse_trans;,
+  {git,"https://github.com/uwiger/parse_trans.git;,
{ref,"d99fb36755c813a5db23e6f93741aa58323ef911"}},
   1},
  {<<"pkt">>,
@@ -47,11 +50,9 @@
 {pkg_hash,[
  {<<"cut">>, 
<<"1577F2F3BC0F2BF3B97903B7426F8A3D79523687B6A444D0F59A095EF69A0E81">>},
  {<<"goldrush">>, 
<<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>},
- {<<"gtplib">>, 
<<"41E8E14BE21DD6E08B2CBB9D708BCF8FDD47CA49D7FFA480219CAB29F5AE2760">>},
  {<<"ppplib">>, 
<<"F9EC2690532BAF590277A305A2276FCFAD0285557E102F8A2FCAF1BF081A">>}]},
 {pkg_hash_ext,[
  {<<"cut">>, 
<<"1A4A25DB2B7C5565FD28B314A4EEB898B1ED3CAFFA1AB09149345FB5731ED04B">>},
  {<<"goldrush">>, 
<<"99CB4128CFFCB3227581E5D4D803D5413FA643F4EB96523F77D9E6937D994CEB">>},
- {<<"gtplib">>, 
<<"264626E6993C17B00CA3C083B9BF23D16B88BEEDDDE35F62C954832C21B57AEF">>},
  {<<"ppplib">>, 
<<"32440D630F55DD29F849847DD8F15F69175FDDC210AA88517AC8AD2854CD6FA1">>}]}
 ].

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36052?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: Iaf2e195aaeac6d1b157a4b0dd6cd3d80deaa1308
Gerrit-Change-Number: 36052
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in ...osmo-epdg[master]: s2b: Reorder some CreateSessionReq according to spec

2024-02-21 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36051?usp=email )


Change subject: s2b: Reorder some CreateSessionReq according to spec
..

s2b: Reorder some CreateSessionReq according to spec

Change-Id: I5f9d4de12038cc3627bf6341ae1cf4d3655a5251
---
M src/epdg_gtpc_s2b.erl
1 file changed, 14 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg 
refs/changes/51/36051/1

diff --git a/src/epdg_gtpc_s2b.erl b/src/epdg_gtpc_s2b.erl
index 309ed79..f635036 100644
--- a/src/epdg_gtpc_s2b.erl
+++ b/src/epdg_gtpc_s2b.erl
@@ -482,8 +482,10 @@
 ipv4 = conv:ip_to_bin(LocalAddrGtpu)
   }
 ],
-IEs = [#v2_recovery{restart_counter = RCnt},
-   #v2_international_mobile_subscriber_identity{imsi = Imsi},
+IEs = [#v2_international_mobile_subscriber_identity{imsi = Imsi},
+   #v2_serving_network{
+plmn_id = gtp_utils:plmn_to_bin(?MCC, ?MNC, ?MNC_SIZE)
+   },
#v2_rat_type{rat_type = 3}, %% 3 = WLAN
#v2_fully_qualified_tunnel_endpoint_identifier{
 instance = 0,
@@ -495,9 +497,7 @@
 #v2_selection_mode{mode = 0},
 #v2_pdn_address_allocation{type = ipv4, address = <<0,0,0,0>>},
 #v2_bearer_context{group = BearersIE},
-#v2_serving_network{
-plmn_id = gtp_utils:plmn_to_bin(?MCC, ?MNC, ?MNC_SIZE)
-}
+#v2_recovery{restart_counter = RCnt}
   ],
 #gtp{version = v2, type = create_session_request, tei = 0, seq_no = SeqNo, 
ie = IEs}.


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36051?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: I5f9d4de12038cc3627bf6341ae1cf4d3655a5251
Gerrit-Change-Number: 36051
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in osmo-ttcn3-hacks[master]: gsup: Add PCO IE

2024-02-21 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36049?usp=email )


Change subject: gsup: Add PCO IE
..

gsup: Add PCO IE

This commit adds a new file PCO_Types.ttcn which allows generically
encoding decoding PCOs.

Change-Id: I9a1ae74712d6e8e0cd524ccd7fc2529b1a15dd97
---
M dia2gsup/gen_links.sh
M epdg/EPDG_Tests.ttcn
M epdg/gen_links.sh
M hlr/gen_links.sh
M library/GSUP_Templates.ttcn
M library/GSUP_Types.ttcn
A library/PCO_Types.ttcn
M msc/gen_links.sh
M selftest/gen_links.sh
M sgsn/gen_links.sh
10 files changed, 181 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/49/36049/1

diff --git a/dia2gsup/gen_links.sh b/dia2gsup/gen_links.sh
index e343bd2..d653781 100755
--- a/dia2gsup/gen_links.sh
+++ b/dia2gsup/gen_links.sh
@@ -40,7 +40,7 @@
 FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc
 IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 gen_links $DIR $FILES

 ignore_pp_results
diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index 2ad1b32..ff026cf 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -8,6 +8,7 @@
 import from DNS_Helpers all;

 import from IPA_Emulation all;
+import from PCO_Types all;
 import from GSUP_Types all;
 import from GSUP_Templates all;
 import from GSUP_Emulation all;
@@ -600,7 +601,8 @@
 /* GSUP TunnelEPDG Tunnel Req + Resp, triggers S2b CreateSession Req + 
Response. */
 private function f_GSUP_EPDGTunnel_success() runs on EPDG_ConnHdlr {
var GSUP_PDU rx_gsup;
-   GSUP.send(ts_GSUP_EPDGTunnel_REQ(g_pars.imsi));
+   var template (value) PCO_DATA pco := ts_PCO({ ts_PCO_P_DNS_IPv4, 
ts_PCO_P_PCSCF_IPv4 });
+   GSUP.send(ts_GSUP_EPDGTunnel_REQ(g_pars.imsi, pco));
as_GTP2C_CreateSession_success();
/* Expect a positive response back to the translator; */
var template (present) GSUP_IEs pdp_info := {
diff --git a/epdg/gen_links.sh b/epdg/gen_links.sh
index c8eadc8..f981586 100755
--- a/epdg/gen_links.sh
+++ b/epdg/gen_links.sh
@@ -46,7 +46,7 @@
 FILES+="DIAMETER_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn 
DIAMETER_ts29_273_Templates.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc
 IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 FILES+="GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn "
 FILES+="GTPv2_CodecPort.ttcn GTPv2_CodecPort_CtrlFunctDef.cc 
GTPv2_CodecPort_CtrlFunct.ttcn GTPv2_Emulation.ttcn "
 gen_links $DIR $FILES
diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh
index 52e01ba..e3a64d9 100755
--- a/hlr/gen_links.sh
+++ b/hlr/gen_links.sh
@@ -45,7 +45,7 @@

 DIR=../library
 FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn 
Osmocom_CTRL_Adapter.ttcn "
 FILES+="Osmocom_VTY_Functions.ttcn "
 FILES+="SS_Templates.ttcn USSD_Helpers.ttcn "
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 10c682c..d886088 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -17,6 +17,7 @@

 import from General_Types all;
 import from Osmocom_Types all;
+import from PCO_Types all;
 import from GSUP_Types all;

 function f_gsup_postprocess_decoded(inout GSUP_PDU gsup) {
@@ -292,6 +293,14 @@
}
 }

+template (value) GSUP_IE ts_GSUP_IE_PCO(template (value) PCO_DATA pco) := {
+   tag := OSMO_GSUP_PCO_IE,
+   len := 0,
+   val := {
+   pco := pco
+   }
+}
+
 template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template 
GSUP_IEs ies := *) := {
msg_type := msgt,
ies := ies
@@ -496,11 +505,13 @@

 /* EPDG Tunnel */
 template (value) GSUP_PDU ts_GSUP_EPDGTunnel_REQ(hexstring imsi,
+template (value) PCO_DATA pco,
 GSUP_Message_Class 
message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
 GSUP_CnDomain dom := 
OSMO_GSUP_CN_DOMAIN_PS,
 template (omit) octetstring 
source_name := omit) :=
ts_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_REQUEST, f_gen_ts_ies(imsi,

[S] Change in osmo-trx[master]: ms: update osmocom-bb submodule

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36048?usp=email )

Change subject: ms: update osmocom-bb submodule
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36048?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0140f0a5333469f356c85a95660e10bbdd67cd25
Gerrit-Change-Number: 36048
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:43:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add demod test tool and data

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email )

Change subject: ms: add demod test tool and data
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I852e34d9667d1f12f235f8b3da1fcc0d738b2db9
Gerrit-Change-Number: 36047
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:43:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add sigproclib demod

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email )

Change subject: ms: add sigproclib demod
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I6558992bd69f18526be5ebe7d424ca00ceb67772
Gerrit-Change-Number: 36046
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:43:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: hard preswapped VA gsm bits

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email )

Change subject: ms: hard preswapped VA gsm bits
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I44b95dced64208eebfb5214da034a5d49abdd0df
Gerrit-Change-Number: 36045
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:43:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: get rid of std::thread

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36044?usp=email )

Change subject: ms: get rid of std::thread
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36044?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0ba2fd958530394b9d99ed82111064d428c5870f
Gerrit-Change-Number: 36044
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:42:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: [cosmetic] input/ipaccess.c: We use tab indent, not spaces [wtf]

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36041?usp=email )

Change subject: [cosmetic] input/ipaccess.c: We use tab indent, not spaces [wtf]
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36041?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I6ba728ccf7f6d81dc42d1ff82a29b557752e80ba
Gerrit-Change-Number: 36041
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:28:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: input/ipa: Log error message also in unexpeted error paths

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36040?usp=email )

Change subject: input/ipa: Log error message also in unexpeted error paths
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36040?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ib2134817f44026adf0111051ed9ec3c6b8fbe7c9
Gerrit-Change-Number: 36040
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:28:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: [cosmetic] Don't break lines shorter than 120 chars

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email )

Change subject: [cosmetic] Don't break lines shorter than 120 chars
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I0595ee899639d0eb798eb8d9372793db36f05b7a
Gerrit-Change-Number: 36039
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:27:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-abis[master]: input/ipaccess: Always log with context, if we have any

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email )

Change subject: input/ipaccess: Always log with context, if we have any
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I5cd84c2d69c0db3be296cb5d9a62720f7b2c827e
Gerrit-Change-Number: 36037
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:27:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: input/ipaccess: Makes sure to say "TCP keepalive"

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36038?usp=email )

Change subject: input/ipaccess: Makes sure to say "TCP keepalive"
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36038?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4
Gerrit-Change-Number: 36038
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:27:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: ipa_keepalive: Make FSM a bit less quiet

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email )

Change subject: ipa_keepalive: Make FSM a bit less quiet
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iad20b86f893c1036affaf14f978099fa858a0031
Gerrit-Change-Number: 36036
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:27:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-epdg: Create tun with iface name gtp0

2024-02-21 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36042?usp=email )


Change subject: ttcn3-epdg: Create tun with iface name gtp0
..

ttcn3-epdg: Create tun with iface name gtp0

As done in the default/usual config.

Change-Id: I066c22a381ab85762c8ef247a5eb248f7adf6c71
---
M ttcn3-epdg-test/osmo-epdg.config
1 file changed, 17 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/42/36042/1

diff --git a/ttcn3-epdg-test/osmo-epdg.config b/ttcn3-epdg-test/osmo-epdg.config
index 6c65172..384be23 100644
--- a/ttcn3-epdg-test/osmo-epdg.config
+++ b/ttcn3-epdg-test/osmo-epdg.config
@@ -43,12 +43,12 @@
  %% gtp_u_kmod config
  %% ===
   {gtp_u_kmod, [
-{sockets, [{grx, [%% ip: IP Address assigned at the tunnel:
-  {ip, {172,18,10,20}},
-  %% Allow binding to an IP address that is nonlocal or 
does not (yet) exist (IP_FREEBIND):
-  freebind,
-  % Create gtp tundev with role SGSN:
-  {role, sgsn}
+{sockets, [{gtp0, [%% ip: IP Address assigned at the tunnel:
+   {ip, {172,18,10,20}},
+   %% Allow binding to an IP address that is nonlocal or 
does not (yet) exist (IP_FREEBIND):
+   freebind,
+   % Create gtp tundev with role SGSN:
+   {role, sgsn}
  ]
   }]
 }

-- 
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36042?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I066c22a381ab85762c8ef247a5eb248f7adf6c71
Gerrit-Change-Number: 36042
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in docker-playground[master]: ttcn3-epdg: Give some time for osmo-epdg to start

2024-02-21 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36043?usp=email )


Change subject: ttcn3-epdg: Give some time for osmo-epdg to start
..

ttcn3-epdg: Give some time for osmo-epdg to start

erlang osmo-epdg is a bit slow starting up, and sometimes the first ttcn3
test may start when osmo-epdg is still not yet listening on the GSUP
socket, specially when the system is on high load.
Give some head time to make sure it is properly started.

Change-Id: I14e39db6548409b203e15fb562e0b44a90bd44cd
---
M ttcn3-epdg-test/jenkins.sh
1 file changed, 17 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/43/36043/1

diff --git a/ttcn3-epdg-test/jenkins.sh b/ttcn3-epdg-test/jenkins.sh
index eb596dc..096b2af 100755
--- a/ttcn3-epdg-test/jenkins.sh
+++ b/ttcn3-epdg-test/jenkins.sh
@@ -31,6 +31,9 @@
$DOCKER_ARGS \
$REPO_USER/osmo-epdg-$IMAGE_SUFFIX

+# Give some time to osmo-epdg to be fully started; it's a bit slow...
+sleep 2
+
 echo Starting container with EPDG testsuite
 docker run --rm \
$(docker_network_params $SUBNET 103) \

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36043?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I14e39db6548409b203e15fb562e0b44a90bd44cd
Gerrit-Change-Number: 36043
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in libosmo-abis[master]: [cosmetic] Don't break lines shorter than 120 chars

2024-02-21 Thread laforge
Attention is currently required from: laforge, pespin.

Hello Jenkins Builder, pespin,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+1 by pespin, Verified-1 by Jenkins Builder


Change subject: [cosmetic] Don't break lines shorter than 120 chars
..

[cosmetic] Don't break lines shorter than 120 chars

Change-Id: I0595ee899639d0eb798eb8d9372793db36f05b7a
---
M src/input/ipaccess.c
1 file changed, 13 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/39/36039/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I0595ee899639d0eb798eb8d9372793db36f05b7a
Gerrit-Change-Number: 36039
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in libosmo-abis[master]: input/ipaccess: Makes sure to say "TCP keepalive"

2024-02-21 Thread laforge
Attention is currently required from: laforge, pespin.

Hello Jenkins Builder, pespin,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmo-abis/+/36038?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+1 by pespin, Verified+1 by Jenkins Builder


Change subject: input/ipaccess: Makes sure to say "TCP keepalive"
..

input/ipaccess: Makes sure to say "TCP keepalive"

We have TCP and IPA keepalive.  Reading a message like

"input/ipaccess.c:612 Keepalive is set: 0" is misleading, as one might
assume it relates to IPA.

Be explicit.

Related: SYS#6801
Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4
---
M src/input/ipaccess.c
1 file changed, 29 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/38/36038/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36038?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4
Gerrit-Change-Number: 36038
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in libosmo-abis[master]: [cosmetic] input/ipaccess.c: We use tab indent, not spaces [wtf]

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36041?usp=email )


Change subject: [cosmetic] input/ipaccess.c: We use tab indent, not spaces [wtf]
..

[cosmetic] input/ipaccess.c: We use tab indent, not spaces [wtf]

Change-Id: I6ba728ccf7f6d81dc42d1ff82a29b557752e80ba
---
M src/input/ipaccess.c
1 file changed, 15 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/41/36041/1

diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 04244a6..75d9693 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -622,11 +622,11 @@
ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, , 
sizeof(val));
if (ret < 0)
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP 
keepalive count: %s\n", strerror(errno));
-val = 1000 * line->keepalive_num_probes *
-line->keepalive_probe_interval +
-line->keepalive_idle_timeout;
+   val = 1000 * line->keepalive_num_probes *
+   line->keepalive_probe_interval +
+   line->keepalive_idle_timeout;
ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, , 
sizeof(val));
-if (ret < 0)
+   if (ret < 0)
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP user 
timeout: %s\n", strerror(errno));
}

@@ -697,8 +697,8 @@
struct osmo_fd *bfd;
int i, ret;

-/* We don't know yet which OML link to associate it with. Thus, we
- * allocate a temporary E1 line until we have received ID. */
+   /* We don't know yet which OML link to associate it with. Thus, we
+* allocate a temporary E1 line until we have received ID. */
line = e1inp_line_clone(tall_ipa_ctx, link->line, "ipa_bfd");
if (line == NULL) {
LOGP(DLINP, LOGL_ERROR, "could not clone E1 line\n");

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36041?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I6ba728ccf7f6d81dc42d1ff82a29b557752e80ba
Gerrit-Change-Number: 36041
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in libosmo-abis[master]: input/ipaccess: Always log with context, if we have any

2024-02-21 Thread laforge
Attention is currently required from: laforge, pespin.

Hello Jenkins Builder, pespin,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+1 by pespin, Verified-1 by Jenkins Builder


Change subject: input/ipaccess: Always log with context, if we have any
..

input/ipaccess: Always log with context, if we have any

Calling global LOGP/DEBUGP without giving any context (e.g. by using
LOGPIL, LOGPITS, ...) will leave the user wonder *which* line or
timeslot generated a certain log line.  We should know better than that.

Change-Id: I5cd84c2d69c0db3be296cb5d9a62720f7b2c827e
---
M src/input/ipaccess.c
1 file changed, 71 insertions(+), 95 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/37/36037/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I5cd84c2d69c0db3be296cb5d9a62720f7b2c827e
Gerrit-Change-Number: 36037
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in libosmo-abis[master]: ipaccess: Log ERROR message if IPA keep-alive FSM allocation fails

2024-02-21 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36035?usp=email )

Change subject: ipaccess: Log ERROR message if IPA keep-alive FSM allocation 
fails
..

ipaccess: Log ERROR message if IPA keep-alive FSM allocation fails

This is a rather serious and unexpected event, it shouldn't go quiet.

Related: SYS#6801

Change-Id: Ic310b3544ae817e26247facf30ece617fefa82eb
---
M src/input/ipaccess.c
1 file changed, 19 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve




diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 48a1d40..7c91e70 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -160,8 +160,10 @@

ka_fsm = ipa_generic_conn_alloc_keepalive_fsm(tall_ipa_ctx, bfd, 
line->ipa_kap, id);
e1i_ts->driver.ipaccess.ka_fsm = ka_fsm;
-   if (!ka_fsm)
+   if (!ka_fsm) {
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Failed to allocate IPA 
keepalive FSM\n");
return;
+   }

ipa_keepalive_fsm_set_timeout_cb(ka_fsm, ipa_bsc_keepalive_timeout_cb);
ipa_keepalive_fsm_set_send_cb(ka_fsm, 
ipa_bsc_keepalive_write_server_cb);
@@ -198,8 +200,10 @@

ka_fsm = ipa_client_conn_alloc_keepalive_fsm(client, line->ipa_kap, id);
e1i_ts->driver.ipaccess.ka_fsm = ka_fsm;
-   if (!ka_fsm)
+   if (!ka_fsm) {
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Failed to allocate IPA 
keepalive FSM\n");
return;
+   }

ipa_keepalive_fsm_set_timeout_cb(ka_fsm, ipa_bts_keepalive_timeout_cb);
ipa_keepalive_fsm_set_send_cb(ka_fsm, 
ipa_bts_keepalive_write_client_cb);

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36035?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic310b3544ae817e26247facf30ece617fefa82eb
Gerrit-Change-Number: 36035
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in libosmo-abis[master]: ipa_keepalive: Make FSM a bit less quiet

2024-02-21 Thread laforge
Attention is currently required from: pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email )

Change subject: ipa_keepalive: Make FSM a bit less quiet
..


Patch Set 2:

(1 comment)

File src/input/ipa_keepalive.c:

https://gerrit.osmocom.org/c/libosmo-abis/+/36036/comment/4382d051_88daf717
PS1, Line 326:  LOGPFSML(fi, LOGL_INFO, "Starting IPA keep-alive FSM 
(interval=%u wait=%u)\n",
> maybe write "s" for seconds or whatever unit after the value, so it becomes 
> obvious just by reading  […]
Done



--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iad20b86f893c1036affaf14f978099fa858a0031
Gerrit-Change-Number: 36036
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:11:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: ipaccess: Log ERROR message if IPA keep-alive FSM allocation fails

2024-02-21 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36035?usp=email )

Change subject: ipaccess: Log ERROR message if IPA keep-alive FSM allocation 
fails
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36035?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic310b3544ae817e26247facf30ece617fefa82eb
Gerrit-Change-Number: 36035
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:10:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: input/ipa: Log error message also in unexpeted error paths

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36040?usp=email )


Change subject: input/ipa: Log error message also in unexpeted error paths
..

input/ipa: Log error message also in unexpeted error paths

When calling ipa_msg_recv_buffered() we already had log statements
for -EPIPE, -ECONNRESET and zero-lengthe read (EOF), but not yet for any
other error causes.  Let's add a related 'else' clause.

Change-Id: Ib2134817f44026adf0111051ed9ec3c6b8fbe7c9
Related: SYS#6801
---
M src/input/ipa.c
1 file changed, 18 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/40/36040/1

diff --git a/src/input/ipa.c b/src/input/ipa.c
index 2235b39..5b064e0 100644
--- a/src/input/ipa.c
+++ b/src/input/ipa.c
@@ -66,6 +66,8 @@
LOGIPA(link, LOGL_ERROR, "lost connection with 
server\n");
else if (ret == 0)
LOGIPA(link, LOGL_ERROR, "connection closed with 
server\n");
+   else
+   LOGIPA(link, LOGL_ERROR, "unknown error %d from 
socket\n", ret);
ipa_client_conn_close(link);
if (link->updown_cb)
link->updown_cb(link, 0);
@@ -410,6 +412,8 @@
LOGIPA(conn, LOGL_ERROR, "lost connection with 
server\n");
else if (ret == 0)
LOGIPA(conn, LOGL_ERROR, "connection closed with 
server\n");
+   else
+   LOGIPA(conn, LOGL_ERROR, "unknown error %d from 
socket\n", ret);
ipa_server_conn_destroy(conn);
return -EBADF;
}

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36040?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ib2134817f44026adf0111051ed9ec3c6b8fbe7c9
Gerrit-Change-Number: 36040
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in libosmo-abis[master]: [cosmetic] Don't break lines shorter than 120 chars

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email )

Change subject: [cosmetic] Don't break lines shorter than 120 chars
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I0595ee899639d0eb798eb8d9372793db36f05b7a
Gerrit-Change-Number: 36039
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:01:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: input/ipaccess: Makes sure to say "TCP keepalive"

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36038?usp=email )

Change subject: input/ipaccess: Makes sure to say "TCP keepalive"
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36038?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4
Gerrit-Change-Number: 36038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:01:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-abis[master]: input/ipaccess: Always log with context, if we have any

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email )

Change subject: input/ipaccess: Always log with context, if we have any
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I5cd84c2d69c0db3be296cb5d9a62720f7b2c827e
Gerrit-Change-Number: 36037
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 17:00:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: ipa_keepalive: Make FSM a bit less quiet

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email )

Change subject: ipa_keepalive: Make FSM a bit less quiet
..


Patch Set 1: Code-Review+1

(1 comment)

File src/input/ipa_keepalive.c:

https://gerrit.osmocom.org/c/libosmo-abis/+/36036/comment/c04e3da8_f678a5ae
PS1, Line 326:  LOGPFSML(fi, LOGL_INFO, "Starting IPA keep-alive FSM 
(interval=%u wait=%u)\n",
maybe write "s" for seconds or whatever unit after the value, so it becomes 
obvious just by reading at the log line.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iad20b86f893c1036affaf14f978099fa858a0031
Gerrit-Change-Number: 36036
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 16:59:08 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: ipaccess: Log ERROR message if IPA keep-alive FSM allocation fails

2024-02-21 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36035?usp=email )

Change subject: ipaccess: Log ERROR message if IPA keep-alive FSM allocation 
fails
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36035?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic310b3544ae817e26247facf30ece617fefa82eb
Gerrit-Change-Number: 36035
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 16:57:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: [cosmetic] Don't break lines shorter than 120 chars

2024-02-21 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email )

Change subject: [cosmetic] Don't break lines shorter than 120 chars
..


Patch Set 1:

(2 comments)

File src/input/ipaccess.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-14551):
https://gerrit.osmocom.org/c/libosmo-abis/+/36039/comment/5aa1ca29_37cb5335
PS1, Line 628: ret = setsockopt(fd, IPPROTO_TCP, 
TCP_USER_TIMEOUT, , sizeof(val));
code indent should use tabs where possible


Robot Comment from checkpatch (run ID jenkins-gerrit-lint-14551):
https://gerrit.osmocom.org/c/libosmo-abis/+/36039/comment/53430816_91732fea
PS1, Line 628: ret = setsockopt(fd, IPPROTO_TCP, 
TCP_USER_TIMEOUT, , sizeof(val));
please, no spaces at the start of a line



--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I0595ee899639d0eb798eb8d9372793db36f05b7a
Gerrit-Change-Number: 36039
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 16:52:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmo-abis[master]: input/ipaccess: Makes sure to say "TCP keepalive"

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36038?usp=email )


Change subject: input/ipaccess: Makes sure to say "TCP keepalive"
..

input/ipaccess: Makes sure to say "TCP keepalive"

We have TCP and IPA keepalive.  Reading a message like

"input/ipaccess.c:612 Keepalive is set: 0" is misleading, as one might
assume it relates to IPA.

Be explicit.

Related: SYS#6801
Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4
---
M src/input/ipaccess.c
1 file changed, 29 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/38/36038/1

diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 7cb16ad..7b17f87 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -595,9 +595,9 @@
val = 1;
ret = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, , 
sizeof(val));
if (ret < 0)
-   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set 
keepalive: %s\n", strerror(errno));
+   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to enable TCP 
keepalive: %s\n", strerror(errno));
else
-   LOGPIL(line, DLINP, LOGL_NOTICE, "Keepalive is set: 
%i\n", ret);
+   LOGPIL(line, DLINP, LOGL_NOTICE, "TCP Keepalive is 
enabled\n");

/* The following options are not portable! */
val = line->keepalive_idle_timeout > 0 ?
@@ -605,29 +605,33 @@
DEFAULT_TCP_KEEPALIVE_IDLE_TIMEOUT;
ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE,
 , sizeof(val));
-   if (ret < 0)
-   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set 
keepalive idle time: %s\n", strerror(errno));
+   if (ret < 0) {
+   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP 
keepalive idle time: %s\n",
+  strerror(errno));
+   }
val = line->keepalive_probe_interval > -1 ?
line->keepalive_probe_interval :
DEFAULT_TCP_KEEPALIVE_INTERVAL;
ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL,
 , sizeof(val));
-   if (ret < 0)
-   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set 
keepalive interval: %s\n", strerror(errno));
+   if (ret < 0) {
+   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP 
keepalive interval: %s\n",
+  strerror(errno));
+   }
val = line->keepalive_num_probes > 0 ?
line->keepalive_num_probes :
DEFAULT_TCP_KEEPALIVE_RETRY_COUNT;
ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT,
 , sizeof(val));
if (ret < 0)
-   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set 
keepalive count: %s\n", strerror(errno));
+   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP 
keepalive count: %s\n", strerror(errno));
 val = 1000 * line->keepalive_num_probes *
 line->keepalive_probe_interval +
 line->keepalive_idle_timeout;
 ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT,
  , sizeof(val));
 if (ret < 0)
-   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set user 
timoeut: %s\n", strerror(errno));
+   LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP user 
timeout: %s\n", strerror(errno));
}

val = 1;

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36038?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4
Gerrit-Change-Number: 36038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in libosmo-abis[master]: [cosmetic] Don't break lines shorter than 120 chars

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email )


Change subject: [cosmetic] Don't break lines shorter than 120 chars
..

[cosmetic] Don't break lines shorter than 120 chars

Change-Id: I0595ee899639d0eb798eb8d9372793db36f05b7a
---
M src/input/ipaccess.c
1 file changed, 13 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/39/36039/1

diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 7b17f87..3400589 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -603,8 +603,7 @@
val = line->keepalive_idle_timeout > 0 ?
line->keepalive_idle_timeout :
DEFAULT_TCP_KEEPALIVE_IDLE_TIMEOUT;
-   ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE,
-, sizeof(val));
+   ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, , 
sizeof(val));
if (ret < 0) {
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP 
keepalive idle time: %s\n",
   strerror(errno));
@@ -612,8 +611,7 @@
val = line->keepalive_probe_interval > -1 ?
line->keepalive_probe_interval :
DEFAULT_TCP_KEEPALIVE_INTERVAL;
-   ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL,
-, sizeof(val));
+   ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, , 
sizeof(val));
if (ret < 0) {
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP 
keepalive interval: %s\n",
   strerror(errno));
@@ -621,15 +619,13 @@
val = line->keepalive_num_probes > 0 ?
line->keepalive_num_probes :
DEFAULT_TCP_KEEPALIVE_RETRY_COUNT;
-   ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT,
-, sizeof(val));
+   ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, , 
sizeof(val));
if (ret < 0)
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP 
keepalive count: %s\n", strerror(errno));
 val = 1000 * line->keepalive_num_probes *
 line->keepalive_probe_interval +
 line->keepalive_idle_timeout;
-ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT,
- , sizeof(val));
+ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, , 
sizeof(val));
 if (ret < 0)
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP user 
timeout: %s\n", strerror(errno));
}

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36039?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I0595ee899639d0eb798eb8d9372793db36f05b7a
Gerrit-Change-Number: 36039
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in libosmo-abis[master]: input/ipaccess: Always log with context, if we have any

2024-02-21 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email )

Change subject: input/ipaccess: Always log with context, if we have any
..


Patch Set 1:

(3 comments)

File src/input/ipaccess.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-14549):
https://gerrit.osmocom.org/c/libosmo-abis/+/36037/comment/3325de40_0ebc380f
PS1, Line 600:  LOGPIL(line, DLINP, LOGL_NOTICE, "Keepalive is 
set: %i\n", ret);
Use %d instead of %i


Robot Comment from checkpatch (run ID jenkins-gerrit-lint-14549):
https://gerrit.osmocom.org/c/libosmo-abis/+/36037/comment/48b6c74f_113543b1
PS1, Line 979:  " port=%u msg_type=%u\n", link->port, msg_type);
code indent should use tabs where possible


Robot Comment from checkpatch (run ID jenkins-gerrit-lint-14549):
https://gerrit.osmocom.org/c/libosmo-abis/+/36037/comment/bae5aeff_140570d9
PS1, Line 1072: "OML connecting to %s:%u\n", 
line->ops->cfg.ipa.addr, IPA_TCP_PORT_OML);
code indent should use tabs where possible



--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I5cd84c2d69c0db3be296cb5d9a62720f7b2c827e
Gerrit-Change-Number: 36037
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 16:44:13 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in libosmo-abis[master]: input/ipaccess: Always log with context, if we have any

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36037?usp=email )


Change subject: input/ipaccess: Always log with context, if we have any
..

input/ipaccess: Always log with context, if we have any

Calling global LOGP/DEBUGP without giving any context (e.g. by using
LOGPIL, LOGPITS, ...) will leave the user wonder *which* line or
timeslot generated a certain log line.  We should know better than that.

Change-Id: I5cd84c2d69c0db3be296cb5d9a62720f7b2c827e
---
M src/input/ipaccess.c
1 file changed, 71 insertions(+), 95 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/37/36037/1

diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 7c91e70..7cb16ad 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -242,46 +242,40 @@
/* this is not an IPA control message, continue */
break;
default:
-   LOGP(DLINP, LOGL_ERROR, "Unexpected return from "
-   "ipa_ccm_rcvmsg_base "
-   "(ret=%d)\n", ret);
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Unexpected return from 
ipa_ccm_rcvmsg_base (ret=%d)\n", ret);
goto err;
}

switch (msg_type) {
case IPAC_MSGT_ID_RESP:
-   DEBUGP(DLMI, "ID_RESP ");
+   LOGPITS(e1i_ts, DLMI, LOGL_DEBUG, "ID_RESP ");
/* parse tags, search for Unit ID */
ret = ipa_ccm_id_resp_parse(, (const uint8_t *)msg->l2h+1, 
msgb_l2len(msg)-1);
DEBUGPC(DLMI, "\n");
if (ret < 0) {
-   LOGP(DLINP, LOGL_ERROR, "IPA response message "
-   "with malformed TLVs\n");
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "IPA response 
message with malformed TLVs\n");
goto err;
}
if (!TLVP_PRESENT(, IPAC_IDTAG_UNIT)) {
-   LOGP(DLINP, LOGL_ERROR, "IPA response message "
-   "without unit ID\n");
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "IPA response 
message without unit ID\n");
goto err;

}
len = TLVP_LEN(, IPAC_IDTAG_UNIT);
if (len < 1) {
-   LOGP(DLINP, LOGL_ERROR, "IPA response message "
-   "with too small unit ID\n");
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "IPA response 
message with too small unit ID\n");
goto err;
}
unitid = (char *) TLVP_VAL(, IPAC_IDTAG_UNIT);
unitid[len - 1] = '\0';
ret = ipa_parse_unitid(unitid, _data);
if (ret) {
-   LOGP(DLINP, LOGL_ERROR, "Failed to parse unit ID 
'%s'\n", unitid);
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Failed to parse 
unit ID '%s'\n", unitid);
goto err;
}

if (!line->ops->sign_link_up) {
-   LOGP(DLINP, LOGL_ERROR,
-"Unable to set signal link, closing socket.\n");
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Unable to set 
signal link, closing socket.\n");
goto err;
}
/* the BSC creates the new sign links at this stage. */
@@ -290,9 +284,7 @@
line->ops->sign_link_up(_data, line,
E1INP_SIGN_OML);
if (sign_link == NULL) {
-   LOGP(DLINP, LOGL_ERROR,
-   "Unable to set signal link, "
-   "closing socket.\n");
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Unable to 
set signal link, closing socket.\n");
goto err;
}

@@ -308,9 +300,7 @@
line->ops->sign_link_up(_data, line,
E1INP_SIGN_RSL);
if (sign_link == NULL) {
-   LOGP(DLINP, LOGL_ERROR,
-   "Unable to set signal link, "
-   "closing socket.\n");
+   LOGPIL(line, DLINP, LOGL_ERROR, "Unable to set 
signal link, closing socket.\n");
goto err;
}
/* Finally, we know which OML link is associated with
@@ -319,10 +309,8 @@
/* this is a bugtrap, the BSC should be using the
 * virtual E1 line used by OML for this RSL link. */

[S] Change in libosmo-abis[master]: ipa_keepalive: Make FSM a bit less quiet

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email )


Change subject: ipa_keepalive: Make FSM a bit less quiet
..

ipa_keepalive: Make FSM a bit less quiet

Let's make sure we log meaningful log messages whenever an IPA keepalive
FSM is started, stopped or if it times out.  This allows the user to
observe whether IPA keepalive is actually enabled (using what timeout),
and also to learn why exactly the connection was dropped.

Change-Id: Iad20b86f893c1036affaf14f978099fa858a0031
Related: SYS#6801
---
M src/input/ipa_keepalive.c
1 file changed, 20 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/36/36036/1

diff --git a/src/input/ipa_keepalive.c b/src/input/ipa_keepalive.c
index 7fc28f1..275fa64 100644
--- a/src/input/ipa_keepalive.c
+++ b/src/input/ipa_keepalive.c
@@ -147,6 +147,7 @@
ifp->params.wait_for_resp, 
T_PONG_NOT_RECEIVED);
return 0;
case T_PONG_NOT_RECEIVED:
+   LOGPFSML(fi, LOGL_NOTICE, "IPA keep-alive FSM timed out: PONG 
not received\n");
/* PONG not received within time */
if (ifp->srv_conn)
conn = ifp->srv_conn;
@@ -320,7 +321,10 @@
 /*! Start the ping/pong procedure of the IPA Keepalive FSM. */
 void ipa_keepalive_fsm_start(struct osmo_fsm_inst *fi)
 {
+   struct ipa_fsm_priv *ifp = fi->priv;
OSMO_ASSERT(fi->fsm == _keepalive_fsm);
+   LOGPFSML(fi, LOGL_INFO, "Starting IPA keep-alive FSM (interval=%u 
wait=%u)\n",
+ifp->params.interval, ifp->params.wait_for_resp);
osmo_fsm_inst_dispatch(fi, OSMO_IPA_KA_E_START, NULL);
 }

@@ -328,5 +332,6 @@
 void ipa_keepalive_fsm_stop(struct osmo_fsm_inst *fi)
 {
OSMO_ASSERT(fi->fsm == _keepalive_fsm);
+   LOGPFSML(fi, LOGL_INFO, "Stopping IPA keep-alive FSM\n");
osmo_fsm_inst_dispatch(fi, OSMO_IPA_KA_E_STOP, NULL);
 }

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iad20b86f893c1036affaf14f978099fa858a0031
Gerrit-Change-Number: 36036
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in libosmo-abis[master]: ipaccess: Log ERROR message if IPA keep-alive FSM allocation fails

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36035?usp=email )


Change subject: ipaccess: Log ERROR message if IPA keep-alive FSM allocation 
fails
..

ipaccess: Log ERROR message if IPA keep-alive FSM allocation fails

This is a rather serious and unexpected event, it shouldn't go quiet.

Related: SYS#6801

Change-Id: Ic310b3544ae817e26247facf30ece617fefa82eb
---
M src/input/ipaccess.c
1 file changed, 19 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/35/36035/1

diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 48a1d40..7c91e70 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -160,8 +160,10 @@

ka_fsm = ipa_generic_conn_alloc_keepalive_fsm(tall_ipa_ctx, bfd, 
line->ipa_kap, id);
e1i_ts->driver.ipaccess.ka_fsm = ka_fsm;
-   if (!ka_fsm)
+   if (!ka_fsm) {
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Failed to allocate IPA 
keepalive FSM\n");
return;
+   }

ipa_keepalive_fsm_set_timeout_cb(ka_fsm, ipa_bsc_keepalive_timeout_cb);
ipa_keepalive_fsm_set_send_cb(ka_fsm, 
ipa_bsc_keepalive_write_server_cb);
@@ -198,8 +200,10 @@

ka_fsm = ipa_client_conn_alloc_keepalive_fsm(client, line->ipa_kap, id);
e1i_ts->driver.ipaccess.ka_fsm = ka_fsm;
-   if (!ka_fsm)
+   if (!ka_fsm) {
+   LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Failed to allocate IPA 
keepalive FSM\n");
return;
+   }

ipa_keepalive_fsm_set_timeout_cb(ka_fsm, ipa_bts_keepalive_timeout_cb);
ipa_keepalive_fsm_set_send_cb(ka_fsm, 
ipa_bts_keepalive_write_client_cb);

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36035?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic310b3544ae817e26247facf30ece617fefa82eb
Gerrit-Change-Number: 36035
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in osmo-ggsn[master]: kernel-gtp: support IPv6 on outer layer

2024-02-21 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email )

Change subject: kernel-gtp: support IPv6 on outer layer
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I257fff1dcd9d030a7f9ea936b2693a3f13208230
Gerrit-Change-Number: 36031
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 21 Feb 2024 16:11:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ggsn[master]: kernel-gtp: support IPv6 on outer layer

2024-02-21 Thread osmith
Attention is currently required from: pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email )

Change subject: kernel-gtp: support IPv6 on outer layer
..


Patch Set 1:

(4 comments)

File gtp/gsn.c:

https://gerrit.osmocom.org/c/osmo-ggsn/+/36031/comment/9f8da66d_47daf4f8
PS1, Line 424:  int domain = in46a_to_af(listen);
> can we call it family at some point? I had to fiugre out what "domain" meant 
> here.
Done


https://gerrit.osmocom.org/c/osmo-ggsn/+/36031/comment/4fd38ec8_0e2f286c
PS1, Line 446:  addr.sin_len = sizeof(struct addr);
> wrong indentation.
Done


https://gerrit.osmocom.org/c/osmo-ggsn/+/36031/comment/c06f2cf8_41fe7af2
PS1, Line 461:  if (bind(*fd, , sizeof(addr)) < 0)
> the bind can be deduplicated by moving it below.
Done


File tests/gtp/Makefile.am:

https://gerrit.osmocom.org/c/osmo-ggsn/+/36031/comment/78e1273a_c962488f
PS1, Line 25:   $(top_builddir)/lib/libmisc.a \
> why is this libmisc needed here now?
Because gsn.c and gtp.c use functions from in46a now, not having libmisc.a 
leads to undefined reference errors.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I257fff1dcd9d030a7f9ea936b2693a3f13208230
Gerrit-Change-Number: 36031
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 21 Feb 2024 15:24:23 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmo-ggsn[master]: kernel-gtp: support IPv6 on outer layer

2024-02-21 Thread osmith
Attention is currently required from: osmith.

Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: kernel-gtp: support IPv6 on outer layer
..

kernel-gtp: support IPv6 on outer layer

Related: OS#1953, OS#6096
Change-Id: I257fff1dcd9d030a7f9ea936b2693a3f13208230
---
M ggsn/ggsn.c
M gtp/gsn.c
M gtp/gsn.h
M gtp/gtp.c
M lib/in46_addr.c
M lib/in46_addr.h
M sgsnemu/sgsnemu.c
M tests/gtp/Makefile.am
8 files changed, 71 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/31/36031/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I257fff1dcd9d030a7f9ea936b2693a3f13208230
Gerrit-Change-Number: 36031
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-MessageType: newpatchset


[S] Change in ...osmo-epdg[master]: debian: Fixes in systemd service

2024-02-21 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?usp=email )

Change subject: debian: Fixes in systemd service
..

debian: Fixes in systemd service

Update the osmo-epdg.service file to point to proper directories.

Patch installed config file so that the libdir points to the dir where
libraries were installed.

Change-Id: Icd640d517b33a840d73aaabef9c594541848357a
---
D contrib/osmo-epdg.service
M contrib/systemd/osmo-epdg.service
A debian/osmo-epdg.dirs
M debian/osmo-epdg.install
M debian/rules
5 files changed, 28 insertions(+), 19 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved




diff --git a/contrib/osmo-epdg.service b/contrib/osmo-epdg.service
deleted file mode 100644
index bfa8293..000
--- a/contrib/osmo-epdg.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Osmocom ePDG (Evolved Packet Data Gateway)
-After=network-online.target
-Wants=network-online.target
-
-[Service]
-Type=simple
-Restart=always
-Environment="HOME=/var/lib/osmo-epdg"
-ExecStartPre=/usr/bin/mkdir -p /var/lib/osmo-epdg
-ExecStart=/usr/bin/osmo-epdg
-RestartSec=2
-
-[Install]
-WantedBy=multi-user.target
diff --git a/contrib/systemd/osmo-epdg.service 
b/contrib/systemd/osmo-epdg.service
index a62a972..48ced12 100644
--- a/contrib/systemd/osmo-epdg.service
+++ b/contrib/systemd/osmo-epdg.service
@@ -1,13 +1,14 @@
 [Unit]
-Description=Osmocom DIAMETER to GSUP translator
-After=osmo-hlr.service
+Description=Osmocom ePDG (Evolved Packet Data Gateway)
 After=network-online.target
 Wants=network-online.target

 [Service]
 Type=simple
 Restart=always
-Environment="HOME=/var/lib/osmo-epdg"
+WorkingDirectory=/var/lib/osmo-epdg
+Environment="ERL_FLAGS=-config /etc/osmocom/osmo-epdg.config"
+ExecStartPre=-/usr/bin/ip link del gtp0
 ExecStartPre=/usr/bin/mkdir -p /var/lib/osmo-epdg
 ExecStart=/usr/bin/osmo-epdg
 RestartSec=2
diff --git a/debian/osmo-epdg.dirs b/debian/osmo-epdg.dirs
new file mode 100644
index 000..563b7ec
--- /dev/null
+++ b/debian/osmo-epdg.dirs
@@ -0,0 +1 @@
+/var/lib/osmo-epdg
diff --git a/debian/osmo-epdg.install b/debian/osmo-epdg.install
index 62aec37..dbfaf2b 100644
--- a/debian/osmo-epdg.install
+++ b/debian/osmo-epdg.install
@@ -1,3 +1,4 @@
+/etc/osmocom/osmo-epdg.config /etc/osmocom/
 /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}/
+/_build/default/lib/gen_socket/priv/lib/gen_socket*.so /usr/lib/
diff --git a/debian/rules b/debian/rules
index 55115ce..1c1478f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,13 @@
cp _checkouts/gen_socket/priv/lib/gen_socket*.so 
./_build/default/lib/gen_socket/priv/lib/; \
fi

+override_dh_install:
+   install -d debian/tmp/etc/osmocom/
+   install -m 755 config/sys.config debian/tmp/etc/osmocom/osmo-epdg.config
+   sed -i 's#_build/default/lib/gen_socket/priv/lib#/usr/lib/#g' \
+   debian/tmp/etc/osmocom/osmo-epdg.config
+   dh_install
+
 override_dh_clean:
dh_clean
rm -rf _build _checkouts

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?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: Icd640d517b33a840d73aaabef9c594541848357a
Gerrit-Change-Number: 36022
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in ...osmo-epdg[master]: rebar.lock: Update after dependency fixes/updates

2024-02-21 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?usp=email )

Change subject: rebar.lock: Update after dependency fixes/updates
..

rebar.lock: Update after dependency fixes/updates

This contains 32bit compilation fixes for gen_socket and support to set
tundev iface name in gtp_u_kmod.

Change-Id: Iea501aca2a15df48aaae2672dcb9d39716ea585c
---
M config/sys.config
M rebar.lock
2 files changed, 29 insertions(+), 17 deletions(-)

Approvals:
  osmith: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/config/sys.config b/config/sys.config
index 660aded..8ed5ca6 100755
--- a/config/sys.config
+++ b/config/sys.config
@@ -42,20 +42,20 @@
  %% ===
   {gtp_u_kmod, [
 %% grx: Name used to log by the module.
-{sockets, [{grx, [%% ip: IP Address assigned at the tunnel, used as local 
GTP-U IP Address.
-  {ip, {127,0,0,2}},
-  %% 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,
-  % Create gtp tundev with role SGSN:
-  {role, sgsn}%,
-  %{vrf, [{routes, [{{10, 180, 0, 0}, 16}]}%%,
-  %  %%{netdev, "upstream"}
-  %  ]
-  %}
+{sockets, [{gtp0, [%% ip: IP Address assigned at the tunnel, used as local 
GTP-U IP Address.
+   {ip, {127,0,0,2}},
+   %% 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,
+   % Create gtp tundev with role SGSN:
+   {role, sgsn}%,
+   %{vrf, [{routes, [{{10, 180, 0, 0}, 16}]}%%,
+   %  %%{netdev, "upstream"}
+   %  ]
+   %}
  ]
   }]
 }
diff --git a/rebar.lock b/rebar.lock
index 4eefe8e..0a492b3 100644
--- a/rebar.lock
+++ b/rebar.lock
@@ -6,7 +6,7 @@
   1},
  {<<"erlando">>,
   {git,"https://github.com/travelping/erlando.git;,
-   {ref,"2cb56e06308beb4d65ae2217a02dc60bafc99b9d"}},
+   {ref,"7ed3a732d1af082a3a2745c36dfd9406148391be"}},
   1},
  {<<"gen_netlink">>,
   {git,"https://github.com/osmocom/gen_netlink;,
@@ -14,12 +14,12 @@
   1},
  {<<"gen_socket">>,
   {git,"https://github.com/osmocom/gen_socket;,
-   {ref,"35e11d6e2f6d87b02dcfc7507a9500bf7ca7329e"}},
+   {ref,"e32b2a3bd5de8088f509aad9c197553cc3acbc6c"}},
   2},
  {<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
  {<<"gtp_u_kmod">>,
   {git,"https://github.com/osmocom/gtp_u_kmod;,
-   {ref,"1dc27ed724403026431f51dd4c3f882499a036b0"}},
+   {ref,"b3656ebb11528a2db3171dbf94f1a8bf0d6ffd00"}},
   0},
  {<<"gtplib">>,{pkg,<<"gtplib">>,<<"3.2.0">>},0},
  {<<"lager">>,

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?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: Iea501aca2a15df48aaae2672dcb9d39716ea585c
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in ...osmo-epdg[master]: debian: Fixes in systemd service

2024-02-21 Thread pespin
Attention is currently required from: lynxis lazus.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?usp=email )

Change subject: debian: Fixes in systemd service
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?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: Icd640d517b33a840d73aaabef9c594541848357a
Gerrit-Change-Number: 36022
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 14:39:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: rebar.lock: Update after dependency fixes/updates

2024-02-21 Thread osmith
Attention is currently required from: laforge, lynxis lazus, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?usp=email )

Change subject: rebar.lock: Update after dependency fixes/updates
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?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: Iea501aca2a15df48aaae2672dcb9d39716ea585c
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 14:37:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: rebar.lock: Update after dependency fixes/updates

2024-02-21 Thread pespin
Attention is currently required from: laforge, lynxis lazus, osmith, pespin.

Hello Jenkins Builder, laforge, lynxis lazus, osmith,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Code-Review+2 by osmith, Code-Review+2 by pespin, Verified+1 by Jenkins Builder

The change is no longer submittable: Code-Review and Verified are unsatisfied 
now.


Change subject: rebar.lock: Update after dependency fixes/updates
..

rebar.lock: Update after dependency fixes/updates

This contains 32bit compilation fixes for gen_socket and support to set
tundev iface name in gtp_u_kmod.

Change-Id: Iea501aca2a15df48aaae2672dcb9d39716ea585c
---
M config/sys.config
M rebar.lock
2 files changed, 29 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg 
refs/changes/21/36021/3
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?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: Iea501aca2a15df48aaae2672dcb9d39716ea585c
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-MessageType: newpatchset


[S] Change in ...osmo-epdg[master]: debian: Fixes in systemd service

2024-02-21 Thread osmith
Attention is currently required from: lynxis lazus, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?usp=email )

Change subject: debian: Fixes in systemd service
..


Patch Set 2: Code-Review+1

(1 comment)

File contrib/systemd/osmo-epdg.service:

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022/comment/70b01217_7d11b8ec
PS1, Line 10: Environment="ERL_FLAGS=-config 
/etc/osmocom/osmo-epdg/osmo-epdg.config"
> * s#/etc/osmocom/osmo-epdg#/etc/osmocom#: ACk, my fault […]
Done



--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?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: Icd640d517b33a840d73aaabef9c594541848357a
Gerrit-Change-Number: 36022
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 14:34:05 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: rebar.lock: Update after dependency fixes/updates

2024-02-21 Thread osmith
Attention is currently required from: laforge, lynxis lazus, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?usp=email )

Change subject: rebar.lock: Update after dependency fixes/updates
..


Patch Set 2: Code-Review+2

(1 comment)

Patchset:

PS2:
re-apply +2 after commit changed for gen_socket. I've tested that this one 
builds successfully on OBS.



--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?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: Iea501aca2a15df48aaae2672dcb9d39716ea585c
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 14:33:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: rebar.lock: Update after dependency fixes/updates

2024-02-21 Thread pespin
Attention is currently required from: laforge, lynxis lazus, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?usp=email )

Change subject: rebar.lock: Update after dependency fixes/updates
..


Patch Set 2: Code-Review+2

(1 comment)

Patchset:

PS2:
I updated the gen_socket commit, now it seems to be fixing the compilation 
error.



--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?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: Iea501aca2a15df48aaae2672dcb9d39716ea585c
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 14:32:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: rebar.lock: Update after dependency fixes/updates

2024-02-21 Thread pespin
Attention is currently required from: laforge, lynxis lazus, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?usp=email )

Change subject: rebar.lock: Update after dependency fixes/updates
..


Patch Set 2:

This change is ready for review.


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?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: Iea501aca2a15df48aaae2672dcb9d39716ea585c
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 14:31:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: debian: Fixes in systemd service

2024-02-21 Thread pespin
Attention is currently required from: lynxis lazus, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?usp=email )

Change subject: debian: Fixes in systemd service
..


Patch Set 2:

This change is ready for review.


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?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: Icd640d517b33a840d73aaabef9c594541848357a
Gerrit-Change-Number: 36022
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 14:31:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in libgtpnl[master]: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh

2024-02-21 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email )

Change subject: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
Gerrit-Change-Number: 36034
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:54:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libgtpnl[master]: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh

2024-02-21 Thread osmith
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh
..

tests/qemu: add 05_ms_ip46_sgsn_ip4.sh

Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
---
M tests/qemu/00_test_functions.sh
A tests/qemu/05_ms_ip46_sgsn_ip4.sh
M tests/qemu/initrd-init.sh
3 files changed, 79 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/34/36034/3
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
Gerrit-Change-Number: 36034
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[M] Change in libgtpnl[master]: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh

2024-02-21 Thread osmith
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh
..

tests/qemu: add 05_ms_ip46_sgsn_ip4.sh

Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
---
M tests/qemu/00_test_functions.sh
A tests/qemu/05_ms_ip46_sgsn_ip4.sh
M tests/qemu/initrd-init.sh
3 files changed, 79 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/34/36034/2
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
Gerrit-Change-Number: 36034
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in libgtpnl[master]: tools/gtp-tunnel: pass rc of gtp_del_tunnel

2024-02-21 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libgtpnl/+/36033?usp=email )

Change subject: tools/gtp-tunnel: pass rc of gtp_del_tunnel
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36033?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: I8046a57a5831e6bdee2ac37415380ce391c79c22
Gerrit-Change-Number: 36033
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:29:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libgtpnl[master]: tests/qemu: pass MS_PROTO to gtp-tunnel delete

2024-02-21 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libgtpnl/+/36032?usp=email )

Change subject: tests/qemu: pass MS_PROTO to gtp-tunnel delete
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36032?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: Ib6b011520fe41855b87ed0e2f6f8a6af3d0b2400
Gerrit-Change-Number: 36032
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:29:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ggsn[master]: kernel-gtp: support IPv6 on inner layer

2024-02-21 Thread pespin
Attention is currently required from: laforge, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/33797?usp=email )

Change subject: kernel-gtp: support IPv6 on inner layer
..


Patch Set 4: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/33797?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I3df47b6c209f1e2f8254ba139581d6e622c6b35f
Gerrit-Change-Number: 33797
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:27:50 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ggsn[master]: kernel-gtp: support IPv6 on outer layer

2024-02-21 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email )

Change subject: kernel-gtp: support IPv6 on outer layer
..


Patch Set 1:

(4 comments)

File gtp/gsn.c:

https://gerrit.osmocom.org/c/osmo-ggsn/+/36031/comment/7495bdfd_f911e5dd
PS1, Line 424:  int domain = in46a_to_af(listen);
can we call it family at some point? I had to fiugre out what "domain" meant 
here.


https://gerrit.osmocom.org/c/osmo-ggsn/+/36031/comment/a6599b05_2820182d
PS1, Line 446:  addr.sin_len = sizeof(struct addr);
wrong indentation.


https://gerrit.osmocom.org/c/osmo-ggsn/+/36031/comment/1c74bf8f_636c7218
PS1, Line 461:  if (bind(*fd, , sizeof(addr)) < 0)
the bind can be deduplicated by moving it below.


File tests/gtp/Makefile.am:

https://gerrit.osmocom.org/c/osmo-ggsn/+/36031/comment/e412d4a9_ada84f2a
PS1, Line 25:   $(top_builddir)/lib/libmisc.a \
why is this libmisc needed here now?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I257fff1dcd9d030a7f9ea936b2693a3f13208230
Gerrit-Change-Number: 36031
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:24:12 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-ggsn[master]: Fix a typo

2024-02-21 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email )

Change subject: Fix a typo
..

Fix a typo

Change-Id: I508274a1a466651025c488ad897aeed739e4b799
---
M ggsn/ggsn.c
1 file changed, 10 insertions(+), 1 deletion(-)

Approvals:
  pespin: Looks good to me, approved
  osmith: Verified




diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 0cde543..918d565 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -193,7 +193,7 @@
}
LOGPAPN(LOGL_INFO, apn, "Opened TUN device %s\n", 
apn->tun.tun->devname);

-   /* Register with libosmcoore */
+   /* Register with libosmocore */
osmo_fd_setup(>tun.fd, apn->tun.tun->fd, OSMO_FD_READ, 
ggsn_tun_fd_cb, apn, 0);
osmo_fd_register(>tun.fd);


--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I508274a1a466651025c488ad897aeed739e4b799
Gerrit-Change-Number: 36029
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: merged


[S] Change in osmo-ggsn[master]: Fix a typo

2024-02-21 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email )

Change subject: Fix a typo
..


Patch Set 1: Verified+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I508274a1a466651025c488ad897aeed739e4b799
Gerrit-Change-Number: 36029
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:16:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ggsn[master]: gtp_new: deduplicate create_and_bind_socket code

2024-02-21 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36030?usp=email )

Change subject: gtp_new: deduplicate create_and_bind_socket code
..


Patch Set 1: Code-Review+1

(1 comment)

Patchset:

PS1:
this should be moved to osmocom socket at some point anyway, but it's not 
urgent and this is a first good stage which I guess you need as a preparation 
for other patches.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36030?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Iff3cfdfb0c08033d869c51499754b3416c71732b
Gerrit-Change-Number: 36030
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:15:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-ggsn-test: kernel-gtp: add ipv6

2024-02-21 Thread osmith
Attention is currently required from: laforge.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/33802?usp=email )

Change subject: ttcn3-ggsn-test: kernel-gtp: add ipv6
..


Patch Set 2:

(1 comment)

This change is ready for review.

Patchset:

PS1:
> See the commit message description: […]
As discussed, created issue https://osmocom.org/issues/6106 for this.



--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/33802?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: If3549db216ff89bdb963744bb38015ad68d4cf6a
Gerrit-Change-Number: 33802
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:15:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in libgtpnl[master]: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh

2024-02-21 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email )


Change subject: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh
..

tests/qemu: add 05_ms_ip46_sgsn_ip4.sh

Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
---
M tests/qemu/00_test_functions.sh
A tests/qemu/05_ms_ip46_sgsn_ip4.sh
M tests/qemu/initrd-init.sh
3 files changed, 80 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/34/36034/1

diff --git a/tests/qemu/00_test_functions.sh b/tests/qemu/00_test_functions.sh
index 5839363..4660d8f 100644
--- a/tests/qemu/00_test_functions.sh
+++ b/tests/qemu/00_test_functions.sh
@@ -50,16 +50,52 @@
ggsn_side gtp-tunnel list
 }

+# Add a second tunnel to test MS with IPv4v6
+tunnel_start_2() {
+   test -n "$MS2_PROTO"
+   test -n "$MS2"
+   test -n "$MS2_PREFLEN"
+   test -n "$WEBSERVER2"
+
+   # SGSN side: add second IP to lo (MS)
+   ip addr add "$MS2"/"$MS2_PREFLEN" dev lo
+
+   # SGSN side: prepare second gtp-tunnel
+   gtp-tunnel add gtp_sgsn v1 200 100 "$MS2" "$GGSN"
+   ip route add "$WEBSERVER2"/"$MS2_PREFLEN" dev gtp_sgsn
+
+   # GGSN side: prepare add second IP to lo (WEBSERVER)
+   ggsn_side ip addr add "$WEBSERVER2"/"$MS2_PREFLEN" dev lo
+
+   # GGSN side: prepare second gtp-tunnel
+   ggsn_side gtp-tunnel add gtp_ggsn v1 100 200 "$MS2" "$SGSN"
+   ggsn_side ip route add "$MS2"/"$MS2_PREFLEN" dev gtp_ggsn
+
+   # List tunnels from both sides
+   gtp-tunnel list
+   ggsn_side gtp-tunnel list
+}
+
 tunnel_ping() {
ip addr show
ping -c 1 "$WEBSERVER"
ggsn_side ping -c 1 "$MS"
+
+   if [ -n "$MS2" ]; then
+   ping -c 1 "$WEBSERVER2"
+   ggsn_side ping -c 1 "$MS2"
+   fi
 }

 tunnel_stop() {
killall gtp-link

ip addr del "$MS"/"$MS_PREFLEN" dev lo
+
+   if [ -n "$MS2" ]; then
+   ip addr del "$MS2"/"$MS2_PREFLEN" dev lo
+   fi
+
ip link set veth_sgsn down

if [ "$SGSN_GGSN_PROTO" == "ip" ]; then  # FIXME: doesn't work with ip6
@@ -69,8 +105,19 @@
ip link del veth_sgsn
ip route del "$WEBSERVER"/"$MS_PREFLEN" dev gtp_sgsn
gtp-tunnel delete gtp_sgsn v1 200 "$MS_PROTO"
+
+   if [ -n "$MS2" ]; then
+   ip route del "$WEBSERVER2"/"$MS2_PREFLEN" dev gtp_sgsn
+   gtp-tunnel delete gtp_sgsn v1 200 "$MS2_PROTO"
+   fi
+
gtp-link del gtp_sgsn
ggsn_side gtp-tunnel delete gtp_ggsn v1 100 "$MS_PROTO"
+
+   if [ -n "$MS2" ]; then
+   ggsn_side gtp-tunnel delete gtp_ggsn v1 100 "$MS2_PROTO"
+   fi
+
ggsn_side gtp-link del gtp_ggsn
ip netns del ggsn_side
 }
diff --git a/tests/qemu/05_ms_ip46_sgsn_ip4.sh 
b/tests/qemu/05_ms_ip46_sgsn_ip4.sh
new file mode 100644
index 000..a0f9220
--- /dev/null
+++ b/tests/qemu/05_ms_ip46_sgsn_ip4.sh
@@ -0,0 +1,23 @@
+#!/bin/sh -ex
+. /tests/00_test_functions.sh
+
+MS_PROTO="ip"
+MS="172.99.0.1"
+MS_PREFLEN="32"
+SGSN_GGSN_PROTO="ip"
+SGSN="172.0.0.1"
+SGSN_PREFLEN="24"
+GGSN="172.0.0.2"
+WEBSERVER="172.99.0.2"
+
+tunnel_start
+
+MS2_PROTO="ip6"
+MS2_PROTO="ip6"
+MS2="fd00::"
+MS2_PREFLEN="64"
+WEBSERVER2="fe00::2"
+
+tunnel_start_2
+tunnel_ping
+tunnel_stop
diff --git a/tests/qemu/initrd-init.sh b/tests/qemu/initrd-init.sh
index ba20592..5dacb86 100755
--- a/tests/qemu/initrd-init.sh
+++ b/tests/qemu/initrd-init.sh
@@ -29,6 +29,7 @@
 run_test 02_ms_ip4_sgsn_ip6.sh
 run_test 03_ms_ip6_sgsn_ip4.sh
 run_test 04_ms_ip6_sgsn_ip6.sh
+run_test 05_ms_ip46_sgsn_ip4.sh

 # Success (run-qemu.sh checks for this line)
 echo "QEMU_TEST_SUCCESSFUL"

--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
Gerrit-Change-Number: 36034
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in libgtpnl[master]: tests/qemu: pass MS_PROTO to gtp-tunnel delete

2024-02-21 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libgtpnl/+/36032?usp=email )


Change subject: tests/qemu: pass MS_PROTO to gtp-tunnel delete
..

tests/qemu: pass MS_PROTO to gtp-tunnel delete

The MS protocol needs to be passed to gtp-tunnel delete, instead of the
SGSN_GGSN_PROTO.

Fix for:
  + gtp-tunnel add gtp_sgsn v1 200 100 172.99.0.1 fd00::2
  …
  + gtp-tunnel delete gtp_sgsn v1 200 ip6
  genl_socket_talk: No such file or directory

Change-Id: Ib6b011520fe41855b87ed0e2f6f8a6af3d0b2400
---
M tests/qemu/00_test_functions.sh
M tests/qemu/01_ms_ip4_sgsn_ip4.sh
M tests/qemu/02_ms_ip4_sgsn_ip6.sh
M tests/qemu/03_ms_ip6_sgsn_ip4.sh
M tests/qemu/04_ms_ip6_sgsn_ip6.sh
5 files changed, 25 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/32/36032/1

diff --git a/tests/qemu/00_test_functions.sh b/tests/qemu/00_test_functions.sh
index c4813ab..5839363 100644
--- a/tests/qemu/00_test_functions.sh
+++ b/tests/qemu/00_test_functions.sh
@@ -8,6 +8,7 @@

 # MS - SGSN -gtp- GGSN - WEBSERVER
 tunnel_start() {
+   test -n "$MS_PROTO"
test -n "$MS"
test -n "$MS_PREFLEN"
test -n "$SGSN_GGSN_PROTO"
@@ -67,9 +68,9 @@

ip link del veth_sgsn
ip route del "$WEBSERVER"/"$MS_PREFLEN" dev gtp_sgsn
-   gtp-tunnel delete gtp_sgsn v1 200 "$SGSN_GGSN_PROTO"
+   gtp-tunnel delete gtp_sgsn v1 200 "$MS_PROTO"
gtp-link del gtp_sgsn
-   ggsn_side gtp-tunnel delete gtp_ggsn v1 100 "$SGSN_GGSN_PROTO"
+   ggsn_side gtp-tunnel delete gtp_ggsn v1 100 "$MS_PROTO"
ggsn_side gtp-link del gtp_ggsn
ip netns del ggsn_side
 }
diff --git a/tests/qemu/01_ms_ip4_sgsn_ip4.sh b/tests/qemu/01_ms_ip4_sgsn_ip4.sh
index 42e2842..4789483 100644
--- a/tests/qemu/01_ms_ip4_sgsn_ip4.sh
+++ b/tests/qemu/01_ms_ip4_sgsn_ip4.sh
@@ -1,6 +1,7 @@
 #!/bin/sh -ex
 . /tests/00_test_functions.sh

+MS_PROTO="ip"
 MS="172.99.0.1"
 MS_PREFLEN="32"
 SGSN_GGSN_PROTO="ip"
diff --git a/tests/qemu/02_ms_ip4_sgsn_ip6.sh b/tests/qemu/02_ms_ip4_sgsn_ip6.sh
index b5858ab..2a489cd 100644
--- a/tests/qemu/02_ms_ip4_sgsn_ip6.sh
+++ b/tests/qemu/02_ms_ip4_sgsn_ip6.sh
@@ -1,6 +1,7 @@
 #!/bin/sh -ex
 . /tests/00_test_functions.sh

+MS_PROTO="ip"
 MS="172.99.0.1"
 MS_PREFLEN="32"
 SGSN_GGSN_PROTO="ip6"
diff --git a/tests/qemu/03_ms_ip6_sgsn_ip4.sh b/tests/qemu/03_ms_ip6_sgsn_ip4.sh
index 12793b0..f873faf 100644
--- a/tests/qemu/03_ms_ip6_sgsn_ip4.sh
+++ b/tests/qemu/03_ms_ip6_sgsn_ip4.sh
@@ -1,6 +1,7 @@
 #!/bin/sh -ex
 . /tests/00_test_functions.sh

+MS_PROTO="ip6"
 MS="fd00::"
 MS_PREFLEN="64"
 SGSN_GGSN_PROTO="ip"
diff --git a/tests/qemu/04_ms_ip6_sgsn_ip6.sh b/tests/qemu/04_ms_ip6_sgsn_ip6.sh
index 6c2f13f..483a9d7 100644
--- a/tests/qemu/04_ms_ip6_sgsn_ip6.sh
+++ b/tests/qemu/04_ms_ip6_sgsn_ip6.sh
@@ -1,6 +1,7 @@
 #!/bin/sh -ex
 . /tests/00_test_functions.sh

+MS_PROTO="ip6"
 MS="fc00::"
 MS_PREFLEN="64"
 SGSN_GGSN_PROTO="ip6"

--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36032?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: Ib6b011520fe41855b87ed0e2f6f8a6af3d0b2400
Gerrit-Change-Number: 36032
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in libgtpnl[master]: tools/gtp-tunnel: pass rc of gtp_del_tunnel

2024-02-21 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libgtpnl/+/36033?usp=email )


Change subject: tools/gtp-tunnel: pass rc of gtp_del_tunnel
..

tools/gtp-tunnel: pass rc of gtp_del_tunnel

Don't exit with 0 if gtp_del_tunnel fails.

Change-Id: I8046a57a5831e6bdee2ac37415380ce391c79c22
---
M tools/gtp-tunnel.c
1 file changed, 14 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/33/36033/1

diff --git a/tools/gtp-tunnel.c b/tools/gtp-tunnel.c
index e8db171..2a5540a 100644
--- a/tools/gtp-tunnel.c
+++ b/tools/gtp-tunnel.c
@@ -131,6 +131,7 @@
 {
struct gtp_tunnel *t;
uint32_t gtp_ifidx;
+   int ret;

if (argc != 6) {
printf("%s del\n",
@@ -171,10 +172,10 @@
return EXIT_FAILURE;
}

-   gtp_del_tunnel(genl_id, nl, t);
+   ret = gtp_del_tunnel(genl_id, nl, t);

gtp_tunnel_free(t);
-   return 0;
+   return ret;
 }

 struct gtp_pdp {

--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36033?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: I8046a57a5831e6bdee2ac37415380ce391c79c22
Gerrit-Change-Number: 36033
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-ggsn[master]: Fix a typo

2024-02-21 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email )

Change subject: Fix a typo
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I508274a1a466651025c488ad897aeed739e4b799
Gerrit-Change-Number: 36029
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:14:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ggsn[master]: kernel-gtp: support IPv6 on inner layer

2024-02-21 Thread osmith
Attention is currently required from: laforge.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/33797?usp=email )

Change subject: kernel-gtp: support IPv6 on inner layer
..


Patch Set 4:

(1 comment)

Patchset:

PS3:
> Ack. Created https://osmocom.org/issues/6123 regarding the kernel module.
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/33797?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I3df47b6c209f1e2f8254ba139581d6e622c6b35f
Gerrit-Change-Number: 33797
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:13:42 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in osmo-ggsn[master]: kernel-gtp: support IPv6 on inner layer

2024-02-21 Thread osmith
Attention is currently required from: laforge.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/33797?usp=email )

Change subject: kernel-gtp: support IPv6 on inner layer
..


Patch Set 4:

This change is ready for review.


--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/33797?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I3df47b6c209f1e2f8254ba139581d6e622c6b35f
Gerrit-Change-Number: 33797
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:13:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: debian: Fixes in systemd service

2024-02-21 Thread pespin
Attention is currently required from: lynxis lazus, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?usp=email )

Change subject: debian: Fixes in systemd service
..


Patch Set 1:

(1 comment)

File contrib/systemd/osmo-epdg.service:

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022/comment/612b6a68_f32686e8
PS1, Line 10: Environment="ERL_FLAGS=-config 
/etc/osmocom/osmo-epdg/osmo-epdg.config"
> * Other configs are in /etc/osmocom without subdir, e.g. 
> /etc/osmocom/osmo-msc.cfg.  […]
* s#/etc/osmocom/osmo-epdg#/etc/osmocom#: ACk, my fault
* s#cfg#config#: This is because it's erlang, not C + libosmovty. I see 
".config" used everywhere in erlang so I'd rather keep that. Anyway the file 
syntax is not the same.



--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?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: Icd640d517b33a840d73aaabef9c594541848357a
Gerrit-Change-Number: 36022
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:13:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


[M] Change in osmo-ggsn[master]: gtp_new: deduplicate create_and_bind_socket code

2024-02-21 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36030?usp=email )


Change subject: gtp_new: deduplicate create_and_bind_socket code
..

gtp_new: deduplicate create_and_bind_socket code

Change-Id: Iff3cfdfb0c08033d869c51499754b3416c71732b
---
M gtp/gsn.c
1 file changed, 60 insertions(+), 71 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/30/36030/1

diff --git a/gtp/gsn.c b/gtp/gsn.c
index 8b3ea3a..eb15eaf 100644
--- a/gtp/gsn.c
+++ b/gtp/gsn.c
@@ -423,11 +423,45 @@
talloc_free(filename);
 }

+static int create_and_bind_socket(const char *name, struct gsn_t *gsn, int 
*fd, int domain,
+ const struct in_addr *listen, int port)
+{
+   struct sockaddr_in addr;
+   int type = SOCK_DGRAM;
+   int protocol = 0;
+
+   *fd = socket(domain, type, protocol);
+
+   if (*fd < 0) {
+   rate_ctr_inc2(gsn->ctrg, GSN_CTR_ERR_SOCKET);
+   LOGP(DLGTP, LOGL_ERROR,
+"%s socket(domain=%d, type=%d, protocol=%d) failed: Error 
= %s\n",
+name, domain, type, protocol, strerror(errno));
+   return -errno;
+   }
+
+   memset(, 0, sizeof(addr));
+   addr.sin_family = domain;
+   addr.sin_addr = *listen;
+   addr.sin_port = htons(port);
+#if defined(__FreeBSD__) || defined(__APPLE__)
+   addr.sin_len = sizeof(addr);
+#endif
+
+   if (bind(*fd, (struct sockaddr *), sizeof(addr)) < 0) {
+   rate_ctr_inc2(gsn->ctrg, GSN_CTR_ERR_SOCKET);
+   LOGP_WITH_ADDR(DLGTP, LOGL_ERROR, addr,
+  "%s bind(fd=%d) failed: Error = %s\n",
+  name, *fd, strerror(errno));
+   return -errno;
+   }
+
+   return 0;
+}
+
 int gtp_new(struct gsn_t **gsn, char *statedir, struct in_addr *listen,
int mode)
 {
-   struct sockaddr_in addr;
-
LOGP(DLGTP, LOGL_NOTICE, "GTP: gtp_newgsn() started at %s\n", 
inet_ntoa(*listen));

*gsn = calloc(sizeof(struct gsn_t), 1); /* TODO */
@@ -467,89 +501,35 @@
(*gsn)->cb_data_ind = 0;

/* Store function parameters */
+   /* Same IP for user traffic and signalling */
(*gsn)->gsnc = *listen;
(*gsn)->gsnu = *listen;
(*gsn)->mode = mode;
 
+   (*gsn)->fd0 = -1;
+   (*gsn)->fd1c = -1;
+   (*gsn)->fd1u = -1;
+
/* Create GTP version 0 socket */
-   if (((*gsn)->fd0 = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
-   rate_ctr_inc2((*gsn)->ctrg, GSN_CTR_ERR_SOCKET);
-   LOGP(DLGTP, LOGL_ERROR,
-"GTPv0 socket(domain=%d, type=%d, protocol=%d) failed: 
Error = %s\n",
-   AF_INET, SOCK_DGRAM, 0, strerror(errno));
-   return -errno;
-   }
-
-   memset(, 0, sizeof(addr));
-   addr.sin_family = AF_INET;
-   addr.sin_addr = *listen;/* Same IP for user traffic and 
signalling */
-   addr.sin_port = htons(GTP0_PORT);
-#if defined(__FreeBSD__) || defined(__APPLE__)
-   addr.sin_len = sizeof(addr);
-#endif
-
-   if (bind((*gsn)->fd0, (struct sockaddr *), sizeof(addr)) < 0) {
-   rate_ctr_inc2((*gsn)->ctrg, GSN_CTR_ERR_SOCKET);
-   LOGP_WITH_ADDR(DLGTP, LOGL_ERROR, addr,
-  "bind(fd0=%d) failed: Error = %s\n",
-  (*gsn)->fd0, strerror(errno));
-   return -errno;
-   }
+   if (create_and_bind_socket("GTPv0", *gsn, &(*gsn)->fd0, AF_INET, 
listen, GTP0_PORT) < 0)
+   goto error;

/* Create GTP version 1 control plane socket */
-   if (((*gsn)->fd1c = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
-   rate_ctr_inc2((*gsn)->ctrg, GSN_CTR_ERR_SOCKET);
-   LOGP(DLGTP, LOGL_ERROR,
-"GTPv1 control plane socket(domain=%d, type=%d, 
protocol=%d) failed: Error = %s\n",
-   AF_INET, SOCK_DGRAM, 0, strerror(errno));
-   return -errno;
-   }
-
-   memset(, 0, sizeof(addr));
-   addr.sin_family = AF_INET;
-   addr.sin_addr = *listen;/* Same IP for user traffic and 
signalling */
-   addr.sin_port = htons(GTP1C_PORT);
-#if defined(__FreeBSD__) || defined(__APPLE__)
-   addr.sin_len = sizeof(addr);
-#endif
-
-   if (bind((*gsn)->fd1c, (struct sockaddr *), sizeof(addr)) < 0) {
-   rate_ctr_inc2((*gsn)->ctrg, GSN_CTR_ERR_SOCKET);
-   LOGP_WITH_ADDR(DLGTP, LOGL_ERROR, addr,
-   "bind(fd1c=%d) failed: Error = %s\n",
-   (*gsn)->fd1c, strerror(errno));
-   return -errno;
-   }
+   if (create_and_bind_socket("GTPv1 control plane", *gsn, &(*gsn)->fd1c, 
AF_INET, listen, GTP1C_PORT) < 0)
+   goto error;

/* Create GTP version 1 user 

[M] Change in osmo-ggsn[master]: kernel-gtp: support IPv6 on outer layer

2024-02-21 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36031?usp=email )


Change subject: kernel-gtp: support IPv6 on outer layer
..

kernel-gtp: support IPv6 on outer layer

Related: OS#1953, OS#6096
Change-Id: I257fff1dcd9d030a7f9ea936b2693a3f13208230
---
M ggsn/ggsn.c
M gtp/gsn.c
M gtp/gsn.h
M gtp/gtp.c
M lib/in46_addr.c
M lib/in46_addr.h
M sgsnemu/sgsnemu.c
M tests/gtp/Makefile.am
8 files changed, 78 insertions(+), 41 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/31/36031/1

diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 918d565..cec043d 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -822,7 +822,7 @@
LOGPGGSN(LOGL_INFO, ggsn, "Starting GGSN\n");

/* Start libgtp listener */
-   if (gtp_new(>gsn, ggsn->cfg.state_dir, >cfg.listen_addr.v4, 
GTP_MODE_GGSN)) {
+   if (gtp_new(>gsn, ggsn->cfg.state_dir, >cfg.listen_addr, 
GTP_MODE_GGSN)) {
LOGPGGSN(LOGL_ERROR, ggsn, "Failed to create GTP: %s\n", 
strerror(errno));
return -1;
}
@@ -830,11 +830,9 @@

/* patch in different addresses to use (in case we're behind NAT, the 
listen
 * address is different from what we advertise externally) */
-   if (ggsn->cfg.gtpc_addr.v4.s_addr)
-   ggsn->gsn->gsnc = ggsn->cfg.gtpc_addr.v4;
+   ggsn->gsn->gsnc = ggsn->cfg.gtpc_addr;

-   if (ggsn->cfg.gtpu_addr.v4.s_addr)
-   ggsn->gsn->gsnu = ggsn->cfg.gtpu_addr.v4;
+   ggsn->gsn->gsnu = ggsn->cfg.gtpu_addr;

/* Register File Descriptors */
osmo_fd_setup(>gtp_fd0, ggsn->gsn->fd0, OSMO_FD_READ, 
ggsn_gtp_fd_cb, ggsn, 0);
diff --git a/gtp/gsn.c b/gtp/gsn.c
index eb15eaf..1109d66 100644
--- a/gtp/gsn.c
+++ b/gtp/gsn.c
@@ -64,11 +64,6 @@

 /* Error reporting functions */

-#define LOGP_WITH_ADDR(ss, level, addr, fmt, args...)\
-   LOGP(ss, level, "addr(%s:%d) " fmt,  \
-inet_ntoa((addr).sin_addr), htons((addr).sin_port), \
-##args);
-
 static const struct rate_ctr_desc gsn_ctr_description[] = {
[GSN_CTR_ERR_SOCKET] = { "err:socket", "Socket error" },
[GSN_CTR_ERR_READFROM] = { "err:readfrom", "readfrom() errors" },
@@ -423,10 +418,10 @@
talloc_free(filename);
 }

-static int create_and_bind_socket(const char *name, struct gsn_t *gsn, int 
*fd, int domain,
- const struct in_addr *listen, int port)
+static int create_and_bind_socket(const char *name, struct gsn_t *gsn, int 
*fd, const struct in46_addr *listen,
+ int port)
 {
-   struct sockaddr_in addr;
+   int domain = in46a_to_af(listen);
int type = SOCK_DGRAM;
int protocol = 0;

@@ -440,29 +435,51 @@
return -errno;
}

-   memset(, 0, sizeof(addr));
-   addr.sin_family = domain;
-   addr.sin_addr = *listen;
-   addr.sin_port = htons(port);
+   switch (domain) {
+   case AF_INET:
+   {
+   struct sockaddr_in addr = {0};
+   addr.sin_family = AF_INET;
+   addr.sin_addr = listen->v4;
+   addr.sin_port = htons(port);
 #if defined(__FreeBSD__) || defined(__APPLE__)
-   addr.sin_len = sizeof(addr);
+   addr.sin_len = sizeof(struct addr);
 #endif
-
-   if (bind(*fd, (struct sockaddr *), sizeof(addr)) < 0) {
-   rate_ctr_inc2(gsn->ctrg, GSN_CTR_ERR_SOCKET);
-   LOGP_WITH_ADDR(DLGTP, LOGL_ERROR, addr,
-  "%s bind(fd=%d) failed: Error = %s\n",
-  name, *fd, strerror(errno));
-   return -errno;
+   if (bind(*fd, , sizeof(addr)) < 0)
+   goto bind_err;
+   break;
+   }
+   case AF_INET6:
+   {
+   struct sockaddr_in6 addr = {0};
+   addr.sin6_family = AF_INET6;
+   addr.sin6_addr = listen->v6;
+   addr.sin6_port = htons(port);
+#if defined(__FreeBSD__) || defined(__APPLE__)
+   addr.sin6_len = sizeof(struct addr);
+#endif
+   if (bind(*fd, , sizeof(addr)) < 0)
+   goto bind_err;
+   break;
+   }
+   default:
+   OSMO_ASSERT(false);
+   break;
}

return 0;
+
+bind_err:
+   rate_ctr_inc2(gsn->ctrg, GSN_CTR_ERR_SOCKET);
+   LOGP(DLGTP, LOGL_ERROR,
+"%s bind(fd=%d, addr=(%s:%d)) failed: Error = %s\n",
+name, *fd, in46a_ntoa(listen), port, strerror(errno));
+   return -errno;
 }

-int gtp_new(struct gsn_t **gsn, char *statedir, struct in_addr *listen,
-   int mode)
+int gtp_new(struct gsn_t **gsn, char *statedir, struct in46_addr *listen, int 
mode)
 {
-   LOGP(DLGTP, LOGL_NOTICE, 

[S] Change in osmo-ggsn[master]: Fix a typo

2024-02-21 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email )


Change subject: Fix a typo
..

Fix a typo

Change-Id: I508274a1a466651025c488ad897aeed739e4b799
---
M ggsn/ggsn.c
1 file changed, 10 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/29/36029/1

diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 0cde543..918d565 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -193,7 +193,7 @@
}
LOGPAPN(LOGL_INFO, apn, "Opened TUN device %s\n", 
apn->tun.tun->devname);

-   /* Register with libosmcoore */
+   /* Register with libosmocore */
osmo_fd_setup(>tun.fd, apn->tun.tun->fd, OSMO_FD_READ, 
ggsn_tun_fd_cb, apn, 0);
osmo_fd_register(>tun.fd);


--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I508274a1a466651025c488ad897aeed739e4b799
Gerrit-Change-Number: 36029
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in ...osmo-epdg[master]: rebar.lock: Update after dependency fixes/updates

2024-02-21 Thread laforge
Attention is currently required from: lynxis lazus, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?usp=email )

Change subject: rebar.lock: Update after dependency fixes/updates
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?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: Iea501aca2a15df48aaae2672dcb9d39716ea585c
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 08:29:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in pysim[master]: osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs

2024-02-21 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/36026?usp=email )

Change subject: osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36026?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id5019b290db1ee90ae1c72b312f08bf3184908ea
Gerrit-Change-Number: 36026
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 08:28:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in pysim[master]: osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs

2024-02-21 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/36026?usp=email )

Change subject: osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs
..

osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs

The original TS.48 profiles have shared/overlapping ICCIDs meaning you
can always install one of them on a given eUICC.  Let's add a set of
modified TS.48 profiles so  you can install any number of them in
parallel on a single eUICC, switching between them via your LPA.

Change-Id: Id5019b290db1ee90ae1c72b312f08bf3184908ea
---
A smdpp-data/upp/TS48V1-A-UNIQUE.der
A smdpp-data/upp/TS48V1-B-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-1A-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-1B-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-3-BERTLV-SUCI-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-3-NOBERTLV-UNIQUE.der
18 files changed, 14 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/smdpp-data/upp/TS48V1-A-UNIQUE.der 
b/smdpp-data/upp/TS48V1-A-UNIQUE.der
new file mode 100644
index 000..18559be
--- /dev/null
+++ b/smdpp-data/upp/TS48V1-A-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V1-B-UNIQUE.der 
b/smdpp-data/upp/TS48V1-B-UNIQUE.der
new file mode 100644
index 000..24ffb8d
--- /dev/null
+++ b/smdpp-data/upp/TS48V1-B-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
new file mode 100644
index 000..657a48e
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..3eba990
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 000..4c8d7f2
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..52999e2
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
new file mode 100644
index 000..700edb5
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..ab731ad
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 000..e340003
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..59bfe56
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..e8ac2c2
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..8cd3a31
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 000..4c8433a
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..8a08988
--- /dev/null
+++ 

[S] Change in pysim[master]: osmo-smdpp: Get rid of hard-coded ICCID

2024-02-21 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/36025?usp=email )

Change subject: osmo-smdpp: Get rid of hard-coded ICCID
..

osmo-smdpp: Get rid of hard-coded ICCID

Read the ICCID from the header of the UPP when building the
ProfileMetdata.  This allows the download of profiles with arbitrary ICCID.

Change-Id: I1b9e17f757f9935436828e6dc1ab75ff17d1d1a4
---
M osmo-smdpp.py
1 file changed, 17 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index 8cb0082..582b222 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -35,6 +35,7 @@
 from pySim.utils import h2b, b2h, swap_nibbles

 import pySim.esim.rsp as rsp
+from pySim.esim import saip
 from pySim.esim.es8p import *
 from pySim.esim.x509_cert import oid, cert_policy_has_oid, cert_get_auth_key_id
 from pySim.esim.x509_cert import CertAndPrivkey, CertificateSet, 
cert_get_subject_key_id, VerifyError
@@ -363,11 +364,14 @@
 if not os.path.isfile(path) or not os.access(path, os.R_OK):
 raise ApiError('8.2.6', '3.8', 'Refused')
 ss.matchingId = matchingId
+with open(path, 'rb') as f:
+pes = saip.ProfileElementSequence.from_der(f.read())
+iccid_str = 
b2h(pes.get_pe_for_type('header').decoded['iccid'])

 # FIXME: we actually want to perform the profile binding herr, and 
read the profile metadat from the profile

 # Put together profileMetadata + _bin
-ss.profileMetadata = ProfileMetadata(iccid_bin= 
h2b(swap_nibbles('89000123456789012358')), spn="OsmocomSPN", 
profile_name="OsmocomProfile")
+ss.profileMetadata = 
ProfileMetadata(iccid_bin=h2b(swap_nibbles(iccid_str)), spn="OsmocomSPN", 
profile_name=matchingId)
 profileMetadata_bin = ss.profileMetadata.gen_store_metadata_request()

 # Put together smdpSigned2 + _bin

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36025?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1b9e17f757f9935436828e6dc1ab75ff17d1d1a4
Gerrit-Change-Number: 36025
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in pysim[master]: osmo-smdpp: Get rid of hard-coded ICCID

2024-02-21 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/36025?usp=email )

Change subject: osmo-smdpp: Get rid of hard-coded ICCID
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36025?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1b9e17f757f9935436828e6dc1ab75ff17d1d1a4
Gerrit-Change-Number: 36025
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 21 Feb 2024 08:28:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: debian: Fixes in systemd service

2024-02-21 Thread osmith
Attention is currently required from: lynxis lazus, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?usp=email )

Change subject: debian: Fixes in systemd service
..


Patch Set 1:

(1 comment)

File contrib/systemd/osmo-epdg.service:

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022/comment/77748ffc_5a5dfd4d
PS1, Line 10: Environment="ERL_FLAGS=-config 
/etc/osmocom/osmo-epdg/osmo-epdg.config"
* Other configs are in /etc/osmocom without subdir, e.g. 
/etc/osmocom/osmo-msc.cfg.
  Maybe do that here as well for consistency?

* Other config files end in .cfg instead of .config... maybe do that too? 
Though I realize that it is a completely different format.



--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?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: Icd640d517b33a840d73aaabef9c594541848357a
Gerrit-Change-Number: 36022
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 08:25:08 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in pysim[master]: saip.personalization: Fix encoding of ICCID in ProfileHeader

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/36028?usp=email )


Change subject: saip.personalization: Fix encoding of ICCID in ProfileHeader
..

saip.personalization: Fix encoding of ICCID in ProfileHeader

To make things exciting, they decided that the ICCID in the profile
header is encoded different from the ICCID contained in EF.ICCID...

Change-Id: I5eacdcdc6bd0ada431eb047bfae930d79d6e3af8
---
M pySim/esim/saip/personalization.py
1 file changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/28/36028/1

diff --git a/pySim/esim/saip/personalization.py 
b/pySim/esim/saip/personalization.py
index 3dad208..dc3435b 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -77,7 +77,7 @@

 def apply(self, pes: ProfileElementSequence):
 # patch the header
-pes.get_pe_for_type('header').decoded['iccid'] = self.value
+pes.get_pe_for_type('header').decoded['iccid'] = h2b(rpad(self.value, 
20))
 # patch MF/EF.ICCID
 file_replace_content(pes.get_pe_for_type('mf').decoded['ef-iccid'], 
h2b(enc_iccid(self.value)))


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36028?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5eacdcdc6bd0ada431eb047bfae930d79d6e3af8
Gerrit-Change-Number: 36028
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/36026?usp=email )


Change subject: osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs
..

osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs

The original TS.48 profiles have shared/overlapping ICCIDs meaning you
can always install one of them on a given eUICC.  Let's add a set of
modified TS.48 profiles so  you can install any number of them in
parallel on a single eUICC, switching between them via your LPA.

Change-Id: Id5019b290db1ee90ae1c72b312f08bf3184908ea
---
A smdpp-data/upp/TS48V1-A-UNIQUE.der
A smdpp-data/upp/TS48V1-B-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-1A-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-1B-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-3-BERTLV-SUCI-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-3-NOBERTLV-UNIQUE.der
18 files changed, 14 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/26/36026/1

diff --git a/smdpp-data/upp/TS48V1-A-UNIQUE.der 
b/smdpp-data/upp/TS48V1-A-UNIQUE.der
new file mode 100644
index 000..18559be
--- /dev/null
+++ b/smdpp-data/upp/TS48V1-A-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V1-B-UNIQUE.der 
b/smdpp-data/upp/TS48V1-B-UNIQUE.der
new file mode 100644
index 000..24ffb8d
--- /dev/null
+++ b/smdpp-data/upp/TS48V1-B-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
new file mode 100644
index 000..657a48e
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..3eba990
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 000..4c8d7f2
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..52999e2
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
new file mode 100644
index 000..700edb5
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..ab731ad
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 000..e340003
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..59bfe56
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..e8ac2c2
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..8cd3a31
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 000..4c8433a
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der 
b/smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 000..8a08988
--- /dev/null
+++ 

[S] Change in pysim[master]: saip.personalization: automatically compute class 'name' attribute

2024-02-21 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/36027?usp=email )


Change subject: saip.personalization: automatically compute class 'name' 
attribute
..

saip.personalization: automatically compute class 'name' attribute

We can use the metaclass to set a proper non-camel-case name attribute.

Change-Id: If02df436c8f5ce01d21e9ee077ad3736e669d103
---
M pySim/esim/saip/personalization.py
1 file changed, 13 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/27/36027/1

diff --git a/pySim/esim/saip/personalization.py 
b/pySim/esim/saip/personalization.py
index 7ac0dbd..3dad208 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -19,6 +19,7 @@
 import io
 from typing import List, Tuple

+from pySim.tlv import camel_to_snake
 from pySim.utils import enc_iccid, enc_imsi, h2b, rpad, sanitize_iccid
 from pySim.esim.saip import ProfileElement, ProfileElementSequence

@@ -41,6 +42,7 @@
 x = super().__new__(metacls, name, bases, namespace)
 for k, v in kwargs.items():
 setattr(x, k, v)
+setattr(x, 'name', camel_to_snake(name))
 return x

 class ConfigurableParameter(abc.ABC, metaclass=ClassVarMeta):
@@ -63,7 +65,6 @@
 class Iccid(ConfigurableParameter):
 """Configurable ICCID.  Expects the value to be a string of decimal digits.
 If the string of digits is only 18 digits long, a Luhn check digit will be 
added."""
-name = 'iccid'

 def validate(self):
 # convert to string as it migt be an integer
@@ -83,7 +84,6 @@
 class Imsi(ConfigurableParameter):
 """Configurable IMSI. Expects value to be a string of digits. 
Automatically sets the ACC to
 the last digit of the IMSI."""
-name = 'imsi'

 def validate(self):
 # convert to string as it migt be an integer

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36027?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If02df436c8f5ce01d21e9ee077ad3736e669d103
Gerrit-Change-Number: 36027
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in pysim[master]: saip.personalization: differentiate input_value from value

2024-02-21 Thread laforge
Attention is currently required from: laforge.

Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/pysim/+/36016?usp=email

to look at the new patch set (#4).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: saip.personalization: differentiate input_value from value
..

saip.personalization: differentiate input_value from value

When personalizing e.g. the ICCID, the input_value is the raw
incrementing counter.  From that, we calculate the Luhn check digit,
and that "output" value is what we'll put in to the EF.ICCID specific
encoder.

However, we also store that output value in the instance in order
to generate the output CSV file containig the card-specific
personalization data.

Change-Id: Idfcd26c8ca9d73a9c2955f7c97e711dd59a27c4e
---
M pySim/esim/saip/personalization.py
1 file changed, 50 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/16/36016/4
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36016?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Idfcd26c8ca9d73a9c2955f7c97e711dd59a27c4e
Gerrit-Change-Number: 36016
Gerrit-PatchSet: 4
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


[S] Change in ...osmo-epdg[master]: rebar.lock: Update after dependency fixes/updates

2024-02-21 Thread osmith
Attention is currently required from: lynxis lazus, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?usp=email )

Change subject: rebar.lock: Update after dependency fixes/updates
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36021?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: Iea501aca2a15df48aaae2672dcb9d39716ea585c
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 21 Feb 2024 08:11:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libgtpnl[master]: gtp-link: close sockets on error

2024-02-21 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/libgtpnl/+/36017?usp=email )

Change subject: gtp-link: close sockets on error
..

gtp-link: close sockets on error

Avoid resource leaks.

Fixes: CID#347578, CID#347579
Change-Id: I9c437de9712ebe568528b4c9ee1e89a4ba5cd5d1
---
M tools/gtp-link.c
1 file changed, 35 insertions(+), 7 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved




diff --git a/tools/gtp-link.c b/tools/gtp-link.c
index 0881f15..0b14bc5 100644
--- a/tools/gtp-link.c
+++ b/tools/gtp-link.c
@@ -80,16 +80,15 @@

 static int setup_socket(struct gtp_server_sock *gtp_sock, int family)
 {
-   int fd1 = socket(family, SOCK_DGRAM, 0);
-   int fd2 = socket(family, SOCK_DGRAM, 0);
int one = 1;

-   if (fd1 < 0 || fd2 < 0)
+   gtp_sock->fd1 = socket(family, SOCK_DGRAM, 0);
+   gtp_sock->fd2 = socket(family, SOCK_DGRAM, 0);
+
+   if (gtp_sock->fd1 < 0 || gtp_sock->fd2 < 0)
return -1;

gtp_sock->family = family;
-   gtp_sock->fd1 = fd1;
-   gtp_sock->fd2 = fd2;

switch (family) {
case AF_INET:
@@ -105,9 +104,9 @@
   _sock->addr.v6, 3386);
setup_sockaddr_in6(_sock->sockaddr.fd2.in6,
   _sock->addr.v6, 2152);
-   if (setsockopt(fd1, IPPROTO_IPV6, IPV6_V6ONLY, , 
sizeof(one)) < 0)
+   if (setsockopt(gtp_sock->fd1, IPPROTO_IPV6, IPV6_V6ONLY, , 
sizeof(one)) < 0)
perror("setsockopt IPV6_V6ONLY: ");
-   if (setsockopt(fd2, IPPROTO_IPV6, IPV6_V6ONLY, , 
sizeof(one)) < 0)
+   if (setsockopt(gtp_sock->fd2, IPPROTO_IPV6, IPV6_V6ONLY, , 
sizeof(one)) < 0)
perror("setsockopt IPV6_V6ONLY: ");
break;
}
@@ -115,6 +114,19 @@
return 0;
 }

+static void close_socket(struct gtp_server_sock *gtp_sock)
+{
+   if (gtp_sock->fd1 != -1) {
+   close(gtp_sock->fd1);
+   gtp_sock->fd1 = -1;
+   }
+
+   if (gtp_sock->fd2 != -1) {
+   close(gtp_sock->fd2);
+   gtp_sock->fd2 = -1;
+   }
+}
+
 int main(int argc, char *argv[])
 {
char buf[MNL_SOCKET_BUFFER_SIZE];
@@ -186,15 +198,18 @@

if (setup_socket(_sock, family) < 0) {
perror("socket");
+   close_socket(_sock);
exit(EXIT_FAILURE);
}

if (bind(gtp_sock.fd1, (struct sockaddr *) _sock.sockaddr.fd1, 
gtp_sock.len) < 0) {
perror("bind");
+   close_socket(_sock);
exit(EXIT_FAILURE);
}
if (bind(gtp_sock.fd2, (struct sockaddr *) _sock.sockaddr.fd2, 
gtp_sock.len) < 0) {
perror("bind");
+   close_socket(_sock);
exit(EXIT_FAILURE);
}

@@ -204,6 +219,7 @@
ret = gtp_dev_create(-1, argv[2], gtp_sock.fd1, gtp_sock.fd2);
if (ret < 0) {
perror("cannot create GTP device\n");
+   close_socket(_sock);
exit(EXIT_FAILURE);
}


--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36017?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: I9c437de9712ebe568528b4c9ee1e89a4ba5cd5d1
Gerrit-Change-Number: 36017
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged