osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/36630?usp=email )
Change subject: repo-install-test: centos8: fix almalinux keys
......................................................................
repo-install-test: centos8: fix almalinux keys
Run "dnf upgrade almalinux-release" inside centos8/almalinux8 to upgrade
the gpg keys first, in order to prevent gpg key errors while installing
packages. We are not running repo-install-test for centos8 in CI anymore
(SYS#6759), but I'm currently using this configuration to manually test
that fixing permissions during upgrade and running systemd services as
users works as expected on an rpm-based system.
Related: OS#4107
Related: https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
Change-Id: Ia06d24ce7ce48651f5a41489e78b5b55dc2d3921
---
M scripts/repo-install-test.sh
1 file changed, 28 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index 7bef5bf..66604f6 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -137,6 +137,15 @@
"$@"
}
+qemu_prepare_vm() {
+ case "$DISTRO" in
+ centos8)
+ # https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
+ qemu_ssh dnf upgrade -y almalinux-release
+ ;;
+ esac
+}
+
qemu_run_test_script() {
cat <<- EOF > "$TEST_DIR/run-inside-env.sh"
#!/bin/sh -ex
@@ -268,4 +277,5 @@
echo
set -x
+qemu_prepare_vm
qemu_run_test_script
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36630?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ia06d24ce7ce48651f5a41489e78b5b55dc2d3921
Gerrit-Change-Number: 36630
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/36635?usp=email )
Change subject: ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg
......................................................................
ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg
This commit fixes the following error:
cp osmo-stp.cfg /home/osmocom-build/jenkins/workspace/ttcn3-sgsn-test-sns/logs/stp/
cp: cannot stat 'osmo-stp.cfg': No such file or directory
Change-Id: Ie0f887dc68e89d2fa1f9a2ee8dfd7f8ce71fc329
Fixes: e4fdd72 "ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg"
---
A ttcn3-sgsn-test-sns/osmo-stp.cfg
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/35/36635/1
diff --git a/ttcn3-sgsn-test-sns/osmo-stp.cfg b/ttcn3-sgsn-test-sns/osmo-stp.cfg
new file mode 120000
index 0000000..6760339
--- /dev/null
+++ b/ttcn3-sgsn-test-sns/osmo-stp.cfg
@@ -0,0 +1 @@
+../ttcn3-sgsn-test/osmo-stp.cfg
\ No newline at end of file
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36635?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: Ie0f887dc68e89d2fa1f9a2ee8dfd7f8ce71fc329
Gerrit-Change-Number: 36635
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36634?usp=email )
Change subject: drop legacy hack: do not start MGW endp in loopback mode
......................................................................
drop legacy hack: do not start MGW endp in loopback mode
We used to tell osmo-mgw to create an IuUP endpoint in loopback mode, in
order to hack it into responding to an IuUP Initialization. The loopback
mode here in osmo-hnbgw is a leftover from that hack. Drop it.
Change-Id: I0eca75d7abf66f8b9fde9c68ec10d4265f64a189
---
M TODO-RELEASE
M src/osmo-hnbgw/mgw_fsm.c
2 files changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/34/36634/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index b5a838d..a80e188 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,4 +7,7 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
-osmo-iuh >1.5.0 proper decoding of X.213 IPv4 address len=7
\ No newline at end of file
+osmo-iuh >1.5.0 proper decoding of X.213 IPv4 address len=7
+
+MGW MGCP CRCX osmo-hnbgw used to CRCX in loopback mode, to trigger a legacy IuUP hack. CRCX is no
+ longer in loopback mode now, so older osmo-mgw may fail to respond to IuUP Initialization.
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c
index d0dc6df..48b4899 100644
--- a/src/osmo-hnbgw/mgw_fsm.c
+++ b/src/osmo-hnbgw/mgw_fsm.c
@@ -175,7 +175,7 @@
mgw_info = (struct mgcp_conn_peer) {
.call_id = (map->rua_ctx_id << 8) | mgw_fsm_priv->rab_id,
.ptime = 20,
- .conn_mode = MGCP_CONN_LOOPBACK,
+ .conn_mode = MGCP_CONN_RECV_SEND,
};
mgw_info.codecs[0] = CODEC_IUFP;
mgw_info.codecs_len = 1;
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36634?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I0eca75d7abf66f8b9fde9c68ec10d4265f64a189
Gerrit-Change-Number: 36634
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/36633?usp=email )
Change subject: mgcp-client: always send 'm=audio' line
......................................................................
mgcp-client: always send 'm=audio' line
Re-add the m=audio line to SDP emitted from libosmo-mgcp-client, even if
the audio port is not set yet
Patch a5acaa68db4cc26e342069ad2ef37c1b09e1efc2 introduced a presence
flag for the RTP audio port number. This flag, when unset, also omitted
the 'm=audio...' line completely, dropping the PT number definitions.
Correct:
m=audio 1234 RTP/AVP 96 <--- anounce 96
a=rtpmap:96 VND.3GPP.IUFP/16000 <--- further specify 96
a=fmtp:96 ... <--- further specify 96
When m=audio is missing, we only have orphaned rtpmap and fmtp entries.
They are supposed to further specify the 96 listed in 'RTP/AVP 96',
instead they are without context:
a=rtpmap:96 VND.3GPP.IUFP/16000
a=fmtp:96 ...
When the presence map indicates no port known, we still need to emit the
list of PT numbers; so we're forced to send a port of 0:
m=audio 0 RTP/AVP 96
a=rtpmap:96 VND.3GPP.IUFP/16000
a=fmtp:96 ...
This is an important fix for osmo-hnbgw, which sends the first CRCX with
an IUFP codec. osmo-mgw requires this to accept incoming IuUP
Initializaition requests. When m=audio is missing, osmo-mgw does not
parse the IUFP codec, and 3G voice fails completely. This mgcp-client
patch will emit valid codec config also when port == 0, fixing
osmo-hnbgw voice, because osmo-mgw will know about IUFP from the start.
Related: SYS#6907
Related: osmo-mgw a5acaa68db4cc26e342069ad2ef37c1b09e1efc2
Change-Id: Id95b629453aec999100b5af821c6a0b9562bb597
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 58 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/33/36633/1
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 8b311d3..a9ad4c0 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -1315,6 +1315,7 @@
int local_ip_family, audio_ip_family;
const char *codec;
unsigned int pt;
+ uint16_t audio_port;
#define MSGB_PRINTF_OR_RET(FMT, ARGS...) do { \
if (msgb_printf(msg, FMT, ##ARGS) != 0) { \
@@ -1366,17 +1367,19 @@
MSGB_PRINTF_OR_RET("t=0 0\r\n");
/* Add RTP address port and codecs */
- if (mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_PORT) {
- if (mgcp_msg->audio_port == 0) {
- LOGPMGW(mgcp, LOGL_ERROR,
- "Invalid port number, can not generate MGCP message\n");
- return -EINVAL;
- }
- MSGB_PRINTF_OR_RET("m=audio %u RTP/AVP", mgcp_msg->audio_port);
- for (i = 0; i < mgcp_msg->ptmap_len; i++)
- MSGB_PRINTF_OR_RET(" %u", mgcp_msg->ptmap[i].pt);
- MSGB_PRINTF_OR_RET("\r\n");
+ audio_port = 0;
+ if ((mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_PORT)) {
+ audio_port = mgcp_msg->audio_port;
+ if (!audio_port) {
+ LOGPMGW(mgcp, LOGL_ERROR,
+ "Invalid port number, can not generate MGCP message\n");
+ return -EINVAL;
+ }
}
+ MSGB_PRINTF_OR_RET("m=audio %u RTP/AVP", audio_port);
+ for (i = 0; i < mgcp_msg->ptmap_len; i++)
+ MSGB_PRINTF_OR_RET(" %u", mgcp_msg->ptmap[i].pt);
+ MSGB_PRINTF_OR_RET("\r\n");
/* Add optional codec parameters (fmtp) */
if (mgcp_msg->param_present) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36633?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Id95b629453aec999100b5af821c6a0b9562bb597
Gerrit-Change-Number: 36633
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email )
Change subject: osmo_io: Add iofd param to segmentation_cb
......................................................................
osmo_io: Add iofd param to segmentation_cb
See related ticket for full rant and historical facts about this
callback.
Since anyway we are still developing osmo_io stuff and there will be ABI
breaks when releasing new version, let's udpate the callback signature
too.
Related: OS#6437
Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
---
M include/osmocom/core/osmo_io.h
M src/core/osmo_io.c
2 files changed, 53 insertions(+), 7 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h
index 8c931dd..6f4dfa8 100644
--- a/include/osmocom/core/osmo_io.h
+++ b/include/osmocom/core/osmo_io.h
@@ -100,6 +100,7 @@
* \param[in] msg message buffer containing the read data. Ownership is transferred to the
* call-back, and it must make sure to msgb_free() it eventually! */
void (*read_cb)(struct osmo_io_fd *iofd, int res, struct msgb *msg);
+
/*! completion call-back function when write issued via osmo_iofd_write_msgb() has completed
* on fd. Only valid in OSMO_IO_FD_MODE_READ_WRITE.
* \param[in] iofd on which a write() has completed.
@@ -108,9 +109,14 @@
* call-back; it is automatically freed after the call-back terminates! */
void (*write_cb)(struct osmo_io_fd *iofd, int res,
struct msgb *msg);
- /*! optional call-back function to segment the data at message boundaries. This is useful when
- * message boundaries are to be preserved over a SOCK_STREAM transport socket like TCP. Can
- * be NULL for any application not requiring de-segmentation of received data.
+
+ /*! optional call-back function to segment the data at message boundaries.
+ * \param[in] msg message buffer whose data is to be segmented
+ * \returns See full function description.
+ *
+ * This is useful when message boundaries are to be preserved over a SOCK_STREAM transport
+ * socket like TCP. Can be NULL for any application not requiring de-segmentation of
+ * received data.
*
* The call-back needs to return the size of the next message. If it returns
* -EAGAIN or a value larger than msgb_length() (message is incomplete)
@@ -119,8 +125,26 @@
* If a full message was received (segmentation_cb() returns a value <= msgb_length())
* the msgb will be trimmed to size by osmo_io and forwarded to the read call-back. Any
* parsing done to the msgb by segmentation_cb() will be preserved for the read_cb()
- * (e.g. setting lxh or msgb->cb). */
+ * (e.g. setting lxh or msgb->cb).
+ *
+ * Only one (or none) of both segmentation_cb and segmentation_cb2 shall be set.
+ * Having both set will be considered an error during iofd setup. */
int (*segmentation_cb)(struct msgb *msg);
+
+ /*! optional call-back function to segment the data at message boundaries.
+ * \param[in] iofd handling msg
+ * \param[in] msg message buffer whose data is to be segmented
+ * \returns See full function description.
+ *
+ * Same as segmentation_cb above, with an extra parameter to have access to the iofd and its
+ * related functionalities (eg data pointer). This is useful for users requiring to store
+ * global state or access external objects while segmenting.
+ *
+ * The provided iofd shall not be freed by the user during the callback.
+ *
+ * Only one (or none) of both segmentation_cb and segmentation_cb2 shall be set.
+ * Having both set will be considered an error during iofd setup. */
+ int (*segmentation_cb2)(struct osmo_io_fd *iofd, struct msgb *msg);
};
/* mode OSMO_IO_FD_MODE_RECVFROM_SENDTO: */
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index b589cb7..af096e6 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -267,7 +267,7 @@
*/
static enum iofd_seg_act iofd_handle_segmentation(struct osmo_io_fd *iofd, struct msgb *msg, struct msgb **pending_out)
{
- int extra_len, received_len;
+ int extra_len, received_len, expected_len;
struct msgb *msg_pending;
/* Save the start of message before segmentation_cb (which could change it) */
@@ -275,12 +275,15 @@
received_len = msgb_length(msg);
- if (!iofd->io_ops.segmentation_cb) {
+ if (iofd->io_ops.segmentation_cb2) {
+ expected_len = iofd->io_ops.segmentation_cb2(iofd, msg);
+ } else if (iofd->io_ops.segmentation_cb) {
+ expected_len = iofd->io_ops.segmentation_cb(msg);
+ } else {
*pending_out = NULL;
return IOFD_SEG_ACT_HANDLE_ONE;
}
- int expected_len = iofd->io_ops.segmentation_cb(msg);
if (expected_len == -EAGAIN) {
goto defer;
} else if (expected_len < 0) {
@@ -599,6 +602,9 @@
return false;
if (ops->recvmsg_cb || ops->sendmsg_cb)
return false;
+ /* Forbid both segementation_cb set, something is wrong: */
+ if (ops->segmentation_cb && ops->segmentation_cb2)
+ return false;
break;
case OSMO_IO_FD_MODE_RECVFROM_SENDTO:
if (ops->read_cb || ops->write_cb)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
Gerrit-Change-Number: 36582
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <daniel(a)totalueberwachung.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged