Attention is currently required from: fixeria, pespin.
Hoernchen has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/41908?usp=email )
Change subject: contrib/jenkins.sh: clean up CFLAGS
......................................................................
Patch Set 4:
(1 comment)
File contrib/jenkins.sh:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/41908/comment/b2f72f16_c8… :
PS4, Line 44: CFLAGS="$CFLAGS -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp -Wno-error=format"
uh, should the lines here not at least be += ?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/41908?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I4e78d6eb3c6c7b40312072fcf70f4b6d80042959
Gerrit-Change-Number: 41908
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 23 Jan 2026 12:55:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/41876?usp=email )
Change subject: Avoid marking rx PFCP Assoc Setup Req as duplicate
......................................................................
Avoid marking rx PFCP Assoc Setup Req as duplicate
Newer versions of PFCP spec state that "A PFCP
function shall ignore the Recovery Timestamp
received in the PFCP Association Setup Request message."
Hence, there's no real way to make sure an incoming PFCP ASSOC
SETUP REQ is a duplicate or is simply a new message from a new instance
of the peer node which "decided" to use the same SeqNr as the previous
one. In that case, it's better to be on the safe side and process it to
tear down state rather than ignoring it and keeping old state. If it
turns out to be a duplicate (rare scenario), we'd maybe tear down some
stuff which would have been set up a few seconds ago.
Change-Id: Ia461550e6791aaf00d18e0310bb4f17fdd2a3f65
---
M src/libosmo-pfcp/pfcp_endpoint.c
1 file changed, 24 insertions(+), 14 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
diff --git a/src/libosmo-pfcp/pfcp_endpoint.c b/src/libosmo-pfcp/pfcp_endpoint.c
index 7c1058f..64ea347 100644
--- a/src/libosmo-pfcp/pfcp_endpoint.c
+++ b/src/libosmo-pfcp/pfcp_endpoint.c
@@ -161,8 +161,13 @@
return osmo_tdef_get(ep->cfg.tdefs, OSMO_PFCP_TIMER_T1, OSMO_TDEF_MS, -1);
}
-static unsigned int ep_keep_resp(struct osmo_pfcp_endpoint *ep)
+static unsigned int ep_keep_resp(const struct osmo_pfcp_endpoint *ep, const struct osmo_pfcp_msg *m)
{
+ /* Don't check for PFCP Assoc Setup Req duplicates: There's no way to
+ * differentiate a duplicate from a new instance of a CP peer which chooses
+ * (willingly or randomly) after restart the same Sequence Number as in previous run. */
+ if (m->h.message_type == OSMO_PFCP_MSGT_ASSOC_SETUP_REQ)
+ return 0;
return osmo_tdef_get(ep->cfg.tdefs, OSMO_PFCP_TIMER_KEEP_RESP, OSMO_TDEF_MS, -1);
}
@@ -271,18 +276,23 @@
static int osmo_pfcp_endpoint_retrans_queue_add(struct osmo_pfcp_endpoint *endpoint, struct osmo_pfcp_msg *m)
{
struct osmo_pfcp_queue_entry *qe;
- unsigned int n1 = ep_n1(endpoint);
- unsigned int t1_ms = ep_t1(endpoint);
- unsigned int keep_resp_ms = ep_keep_resp(endpoint);
- unsigned int timeout = m->is_response ? keep_resp_ms : t1_ms;
+ unsigned int timeout_ms;
+ unsigned int n1 = 0;
- LOGP(DLPFCP, LOGL_DEBUG, "retransmit unanswered Requests %u x %ums; keep sent Responses for %ums\n",
- n1, t1_ms, keep_resp_ms);
- /* If there are no retransmissions or no timeout, it makes no sense to add to the queue. */
- if (!n1 || !t1_ms) {
- if (!m->is_response && m->ctx.resp_cb)
- m->ctx.resp_cb(m, NULL, "PFCP timeout is zero, cannot wait for a response");
- return 0;
+ if (m->is_response) {
+ timeout_ms = ep_keep_resp(endpoint, m);
+ OSMO_LOG_PFCP_MSG(m, LOGL_DEBUG, "keep sent Responses for %ums\n", timeout_ms);
+ } else {
+ timeout_ms = ep_t1(endpoint);
+ n1 = ep_n1(endpoint);
+
+ OSMO_LOG_PFCP_MSG(m, LOGL_DEBUG, "retransmit unanswered Requests %u x %ums\n", n1, timeout_ms);
+ /* If there are no retransmissions or no timeout, it makes no sense to add to the queue. */
+ if (!n1 || !timeout_ms) {
+ if (!m->is_response && m->ctx.resp_cb)
+ m->ctx.resp_cb(m, NULL, "PFCP timeout is zero, cannot wait for a response");
+ return 0;
+ }
}
qe = talloc(endpoint, struct osmo_pfcp_queue_entry);
@@ -290,7 +300,7 @@
*qe = (struct osmo_pfcp_queue_entry){
.ep = endpoint,
.m = m,
- .n1_remaining = m->is_response ? 0 : n1,
+ .n1_remaining = n1,
};
talloc_steal(qe, m);
@@ -308,7 +318,7 @@
}
talloc_set_destructor(qe, osmo_pfcp_queue_destructor);
- osmo_timer_schedule(&qe->t1, timeout/1000, (timeout % 1000) * 1000);
+ osmo_timer_schedule(&qe->t1, timeout_ms/1000, (timeout_ms % 1000) * 1000);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/41876?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: Ia461550e6791aaf00d18e0310bb4f17fdd2a3f65
Gerrit-Change-Number: 41876
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41873?usp=email )
Change subject: esim/http_json_api: add missing check
......................................................................
esim/http_json_api: add missing check
The line actual_sec = func_ex_status.get('statusCodeData', None) suggests
that 'statusCodeData' may be None under normal circumstances. So let's guard
sec.update(actual_sec) so that we won't run into an exception in case
'statusCodeData' is not in func_ex_status.
Related: SYS#7825
Change-Id: I8a1a3cd5e029dba4a3aec1a64702e19b0d694ae2
---
M pySim/esim/http_json_api.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py
index 8324bb9..bb41df3 100644
--- a/pySim/esim/http_json_api.py
+++ b/pySim/esim/http_json_api.py
@@ -149,7 +149,8 @@
'message': None,
}
actual_sec = func_ex_status.get('statusCodeData', None)
- sec.update(actual_sec)
+ if actual_sec:
+ sec.update(actual_sec)
self.subject_code = sec['subjectCode']
self.reason_code = sec['reasonCode']
self.subject_id = sec['subjectIdentifier']
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41873?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8a1a3cd5e029dba4a3aec1a64702e19b0d694ae2
Gerrit-Change-Number: 41873
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41875?usp=email )
Change subject: contrib: add utility to receive ES2+handleDownloadProgressInfo calls
......................................................................
contrib: add utility to receive ES2+handleDownloadProgressInfo calls
We already have a tool to work with the ES2+ API provided by an SMDP+
(es2p_client.py) With this tool we can only make API calls towards
an SMDP+. However, SGP.22 also defines a "reverse direction" ES2+
interface through wich the SMDP+ may make API calls towards the MNO.
At the moment the only possible MNO originated API call is
ES2+handleDownloadProgressInfo. Let's add a simple tool that runs a
HTTP server to receive and log the ES2+handleDownloadProgressInfo
requests.
Related: SYS#7825
Change-Id: I95af30cebae31f7dc682617b1866f4a2dc9b760c
---
A contrib/es2p_server.py
1 file changed, 99 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/contrib/es2p_server.py b/contrib/es2p_server.py
new file mode 100755
index 0000000..6d71689
--- /dev/null
+++ b/contrib/es2p_server.py
@@ -0,0 +1,99 @@
+#!/usr/bin/env python3
+
+# (C) 2026 by sysmocom - s.f.m.c. GmbH
+# All Rights Reserved
+#
+# Author: Philipp Maier
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import sys
+import argparse
+import logging
+import json
+import asn1tools
+import asn1tools.codecs.ber
+import asn1tools.codecs.der
+import pySim.esim.rsp as rsp
+import pySim.esim.saip as saip
+from pySim.esim.es2p import param, Es2pApiServerMno, Es2pApiServerHandlerMno
+from osmocom.utils import b2h
+from datetime import datetime
+from analyze_simaResponse import split_sima_response
+
+logger = logging.getLogger(__name__)
+
+parser = argparse.ArgumentParser(description="""
+Utility to receive and log requests against the ES2+ API of an SM-DP+ according to GSMA SGP.22.""")
+parser.add_argument("--host", help="Host/IP to bind HTTP(S) to", default="localhost")
+parser.add_argument("--port", help="TCP port to bind HTTP(S) to", default=443, type=int)
+parser.add_argument('--server-cert', help='X.509 server certificate used to provide the ES2+ HTTPs service')
+parser.add_argument('--client-ca-cert', help='X.509 CA certificates to authenticate the requesting client(s)')
+parser.add_argument("-v", "--verbose", help="enable debug output", action='store_true', default=False)
+
+def decode_sima_response(sima_response):
+ decoded = []
+ euicc_response_list = split_sima_response(sima_response)
+ for euicc_response in euicc_response_list:
+ decoded.append(saip.asn1.decode('EUICCResponse', euicc_response))
+ return decoded
+
+def decode_result_data(result_data):
+ return rsp.asn1.decode('PendingNotification', result_data)
+
+def decode(data, path="/"):
+ if data is None:
+ return 'none'
+ elif type(data) is datetime:
+ return data.isoformat()
+ elif type(data) is tuple:
+ return {str(data[0]) : decode(data[1], path + str(data[0]) + "/")}
+ elif type(data) is list:
+ new_data = []
+ for item in data:
+ new_data.append(decode(item, path))
+ return new_data
+ elif type(data) is bytes:
+ return b2h(data)
+ elif type(data) is dict:
+ new_data = {}
+ for key, item in data.items():
+ new_key = str(key)
+ if path == '/' and new_key == 'resultData':
+ new_item = decode_result_data(item)
+ elif (path == '/resultData/profileInstallationResult/profileInstallationResultData/finalResult/successResult/' \
+ or path == '/resultData/profileInstallationResult/profileInstallationResultData/finalResult/errorResult/') \
+ and new_key == 'simaResponse':
+ new_item = decode_sima_response(item)
+ else:
+ new_item = item
+ new_data[new_key] = decode(new_item, path + new_key + "/")
+ return new_data
+ else:
+ return data
+
+class Es2pApiServerHandlerForLogging(Es2pApiServerHandlerMno):
+ def call_handleDownloadProgressInfo(self, data: dict) -> (dict, str):
+ logging.info("ES2+:handleDownloadProgressInfo: %s" % json.dumps(decode(data)))
+ return {}, None
+
+if __name__ == "__main__":
+ args = parser.parse_args()
+
+ logging.basicConfig(level=logging.DEBUG if args.verbose else logging.WARNING,
+ format='%(asctime)s %(levelname)s %(message)s',
+ datefmt='%Y-%m-%d %H:%M:%S')
+
+ Es2pApiServerMno(args.port, args.host, Es2pApiServerHandlerForLogging(), args.server_cert, args.client_ca_cert)
+
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41875?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I95af30cebae31f7dc682617b1866f4a2dc9b760c
Gerrit-Change-Number: 41875
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>